At that point, closer Tom Wilhelmsen had already allowed four straight batters to reach base without an out and a 7-2 lead was quickly evaporating.
Left-hander Oliver Perez, who was warming alongside Medina, was forced to come in against switch-hitter Shane Victorino and Thompson stuck with him to face right-hander Dustin Pedroia, knowing lefty David Ortiz was next in line.
But Perez gave up a two-run single to Victorino and an RBI hit by Pedroia before striking out Ortiz for the first out of the ninth.
The rookie Medina finally entered with runners on first and second and a one-run lead, and Jonny Gomes immediately tied the game with an RBI single up the middle. Medina then walked Stephen Drew before Daniel Nava won it with a deep single to center with one out for the Red Sox's Major League-leading 11th walk-off win of the season and second in two nights against Seattle.
"We wanted to go to Medina there and if we had to go to Ollie, he was the next guy," said Thompson, who is filling in while Eric Wedge recovers from a minor stroke. "If there was anything today for me, it was a lesson learned that if you make a motion with either hand, that's it. I didn't realize that.
"I did point to the pen, but I didn't have time to [tap his other arm] for the right-hander," Thompson said. "He'd already turned. That's when I wanted to make sure he knew who I wanted to go to and [crew chief] Gary Darling said it's too late, you raised your left hand up."
How much did that affect what the Mariners were trying to do after Wilhelmsen struggled with his control and let the Red Sox get back into the game?
"You know what? We've got to get three outs," Thompson said. "We didn't get the job done in the ninth inning. I'll look back on it and if that's the ruling on it, I'll take responsibility for that. But we wanted to go with Medina all the way and have Ollie out there in the waiting."
Red Sox manager John Farrell said the situation arises when both a left- and right-hander are warming together.
"When you have two guys up at the same time, you've got to be clear on who you ask for first," Farrell said. "Robby's left arm went up first and he quickly tried to change it, but Gary Darling kept the first call in order and that was to ask for the left-hander. That's what I saw on the field."
The Mariners lost on a 15th-inning walk-off a night earlier, but this one was even more painful after Hernandez had pitched seven innings of one-run ball and turned a 7-1 lead over to the bullpen thanks to a grand slam by Henry Blanco.
"The guy went out there once again and was Felix and did his job," said Thompson. "And we didn't finish it off for him."
"This was a tough series," said Hernandez. "Today hurt a lot. But we just have to get ready for tomorrow and start playing baseball. That's all we've got to do."
Blanco, acquired in mid-June to serve as a backup catcher and mentor to rookie Mike Zunino, cleared the bases with his fifth-inning blast. This is Blanco's 16th season in the big leagues and of his three career grand slams, two have come now in 16 games with Seattle.
Hernandez wound up with a no-decision and remains 11-4 while lowering his American League-leading ERA to 2.30 as he allowed just one run and six hits over seven innings. Hernandez is 6-0 with a 2.11 ERA over his last 12 starts, having not lost since May 25 vs. the Rangers.
Hernandez is 102-25 in his career when given two or more runs of support and the Mariners gave him that and more by jumping on Ryan Dempster for seven runs and nine hits in his six-inning start.
But somehow that wasn't enough as the Red Sox still managed to win their ninth straight over Seattle at Fenway and that was tough for all the Mariners to swallow.
"We were trying to forget about what happened [Wednesday] because that was a tough game, even for those guys," said Perez, who took the loss. "Fifteen innings is not easy. But today Felix did everything he could and we didn't get it done. He did a tremendous job and left us to just get three outs.
"Everything went the other way [in the ninth]," Perez said. "That's a really tough loss for us because of how Felix was pitching and we couldn't get it done. That's really tough."
The win kept the Red Sox in first place in the AL East at 66-44 and was their first walk-off involving at least a five-run comeback in an inning since 2007.
"In a word, magical," Farrell said. "Given that we're down five against a very good pitcher in Wilhelmsen when you consider his raw stuff."
Mariners third baseman Kyle Seager had a ridiculous July when he hit a Major League-leading .396 with a .464 on-base percentage and he didn't let up as the calendar rolled to August. Seager went 2-for-4 with a triple, a walk, two runs, an RBI and a stolen base, raising his season average to .300 in the process.
Designated hitter Kendrys Morales had a season-high four hits and his team-leading 61st RBI, but in the end, the Mariners were swept in the three-game set and now head to Baltimore with a 50-58 record.