Giants reliever Jean Machi, the sixth pitcher manager Bruce Bochy used, started the 10th by walking the first three hitters in the Rays' order.
"[Machi]'s usually pretty good at pounding the strike zone," Bochy said. "He just got out of sync there and couldn't throw strikes."
Machi issued an intentional walk to Ben Zobrist in order to pitch to a slumping Evan Longoria. But Longoria accepted his second consecutive walk, paving the way for Myers.
"When you're walking, you're hitting, and a lot of times it starts with a walk," Rays manager Joe Maddon said. "You start getting your strike zone back, you start seeing the ball better. I'm very pleased with that."
Myers took a looping swing at Machi's first offering.
"I was trying to hit a home run, which was stupid," Myers said. "I had to settle back down. Luckily I didn't put it in play."
He did so on the next pitch, a fastball, but the hardest part of Myers' night was not over. He also experienced his first big league walk-off celebration, complete with shaving cream and his teammates trying to unclothe him.
"I don't really understand that one at all," the 22-year-old rookie, whose out-of-town parents were in attendance, said. "It was wild."
Although Saturday will be remembered for Myers' dramatics, starters David Price and Tim Lincecum did not disappoint. The two former Cy Young Award winners turned in one-run outings, but as masterful as both pitchers were, neither would be declared the winner.
Lincecum gave in first, having thrown 111 pitches in seven innings. Price did not throw his 100th pitch until the ninth, when he retired the heart of the Giants' lineup in order and was then removed.
Fernando Rodney did the rest for the Rays. Although he gave up two hits in the 10th, he struck out shortstop Brandon Crawford to end the inning.
Price has now pitched through the ninth inning in four of his seven starts since returning from the disabled list (left triceps strain) July 2. Maddon acknowledged his ace did not turn in his best work Saturday, but Price's pitch efficiency allowed him to keep the Rays in the game.
On the whole, Maddon sees Price as a better pitcher than he was as a 20-game winner a season ago.
"Even in the Cy Young year, I don't know that I've seen him pitch this well, this consistently," Maddon said. "I'm talking about pitch efficiency, location, command within the strike zone. It's all better now than it has been last year. There isn't a moment that's going to rattle him. The focus and composure is better than it was last year."
It looked as though Price's night could be done in the top of the eighth when he gave up a leadoff double to Jeff Francoeur -- who accounted for three of San Francisco's five hits off Price -- but the left-hander worked his way out of the inning by retiring the next three hitters in order.
Price said he feels just as comfortable as he did a year ago but he is attacking the strike zone and executing pitches at a higher clip. He is averaging just over three balls per inning since his return from the DL.
"I said there was a lot of room for improvement after last year and this is what I was talking about," Price said. "I'm in command of four pitches right now as opposed to two last year. It's fun."
After Lincecum was removed, the home half of the ninth turned into a managers' chess match as Maddon used three different pinch-hitters while Bochy countered with three different relievers. Matt Joyce was declared as a pinch-hitter with one out and two men on but was pulled without seeing a pitch when Bochy went with left-hander Javier Lopez.
The Giants drew first blood in the top of the third inning when Crawford's single snuck through the infield to score Francoeur.
The Rays would answer in the bottom half of the third, manufacturing a run on a walk, a wild pitch, an infield single from Kelly Johnson and finally Zobrist's groundout to second base.