"We wanted to win one for him," Pena said. "This team bears down. We know who we're up against."
Shields allowed three hits in seven innings and retired his final 14 batters. He outpitched Santana, who rebounded nicely from the worst start of his career.
Both starters were lifted after a 73-minute rain delay in the top of the eighth. Dan Wheeler worked a perfect inning and J.P. Howell got three outs for his fourth save.
Ben Zobrist added a solo homer in the ninth, his 15th in a breakout season for the AL champions.
Outhit 5-4, the depleted Mets have another ailing star to worry about: Carlos Beltran plans to have an MRI exam Monday on his aching right knee.
Beltran, who said he intends to play Sunday, missed two games in late May and had a cortisone shot because of a bone bruise below the knee. Hobbling on the bases, he said he's been feeling the same sensation as before and he wants a doctor's opinion.
"If it's something that's going to get worse, I can't be playing," Beltran said.
Santana was tagged for nine runs and nine hits in three-plus innings Sunday, losing 15-0 in the Subway Series finale at Yankee Stadium.
The sluggish performance and diminished velocity on his fastball raised questions about Santana's health, though he insisted he felt fine. After adjusting his mechanics during a recent side session, the ace left-hander looked more like himself Saturday against the top-scoring team in the majors.
"A lot of people were panicking and a lot of people were making comments that had nothing to do with the stuff that I do," Santana said. "We were able to tell that something was wrong, put it back together and work on it. And you know, I feel much better today."
Santana (8-5) squandered a 1-0 lead and took the loss, but didn't allow a hit until Jason Bartlett's one-out double in the fifth. He yielded three hits and three walks in a season-high 7 1/3 innings.
"Johan was back to normal. I didn't think it would be a thing that would last a long time with him," Mets manager Jerry Manuel said. "I felt very confident that he would have a good outing."
The two-time Cy Young Award winner showed better zip and command with his fastball, which clocked around 92 mph all game. That's not Santana at his best, but it was a noticeable improvement from Sunday.
"Last game was just a bad game. We weren't aggressive, we weren't locating pitches the way they're supposed to be located. We made some adjustments," Santana said. "The release point, I think that was the difference."
His strikeout totals, however, have dropped dramatically. Santana fanned three against Tampa Bay, giving him 11 over his last four starts. He averaged 8.6 strikeouts through his first 10 outings.
Gabe Kapler had an RBI double for the Rays, who snapped a three-game slide.
While Santana pitched well, the Mets reverted to their early-season trend of not supporting him with much offense. Tampa Bay pitchers retired 19 in a row before Beltran's two-out single in the ninth. Howell struck out David Wright to end it.
Making his 100th career start, Shields (6-5) won for the first time in five road outings since April 12 at Baltimore. The right-hander struck out four and walked none. The only run he allowed came on doubles by Ryan Church and Omir Santos in the second.
Five of Shields' wins this season have come after Rays losses. He has stopped a five-game skid and a pair of three-gamers.
"It was a battle today," Shields said. "I try not to feed off their pitcher -- just go out and throw my game."
With the score tied 1-all, Santana grooved a 92 mph fastball to Pena leading off the seventh and he got all of it.
The booming drive landed about five rows deep in the right-center bleachers, between the 408 and 415 signs, for Pena's AL-leading 22nd home run.
"I think that ball was the longest home run since Lou Brock at the Polo Grounds," Rays manager Joe Maddon said. "I think our guys in general, after last year, like bigger games, like bigger crowds."
- Rays LF Carl Crawford grounded into a double play for the second consecutive day and third time this season.
- Zobrist's homer ended Sean Green's scoreless streak at a career-best 15 2/3 innings.