Tampa Bay (71-52) has now won two in a row and five of its last six. In addition, the Rays have won seven of their last 10 against the Orioles.
Evan Longoria hit his 25th home run of the season in the first off Orioles starter Chris Tillman. Kelly Johnson added an RBI single in the second to give the Rays a two-run lead.
Baltimore's Danny Valencia, who began the night with a .700 career average against starter David Price doubled home a run in the second, and Matt Wieters doubled home another in the third to tie the score at 2 before Matt Joyce's two-run homer off Tillman in the fourth put the Rays up, 4-2.
Price allowed two runs on 10 hits while walking two and striking out six in five innings to earn his seventh win of the season.
Though Price's pitch count swelled against the O's tough lineup -- he threw 99 pitches -- he did a remarkable job of limiting the damage on a night that would see the Orioles leave 15 runners on base.
"That's the whole thing about a veteran kind of a guy," Maddon said. "He's not going to give in to the moment there. They're going to continue to grind it out. They know they can get through it if they make pitches. And that's what he did. It was outstanding."
In the third inning, the Orioles had runners on second and third with one out, and Price struck out J.J. Hardy and retired Nick Markakis on a foul pop to end the inning.
The fourth inning saw the Orioles place runners at second and third with one out, and Price struck out Manny Machado and Chris Davis to escape the jam.
Price performed one final escape act in the fifth. The Orioles loaded the bases with two outs, and Price got Steve Pearce to ground into a forceout to end the threat.
"It's the most draining it has been in a while," Price said. "I feel like that's the best I've been in my last three outings. This team, they're tough. That's why they're in the position they're in now. They're still fighting for after-September baseball, like we are. That's an extremely tough team. But we made some pitches we needed to. I had some hard-hit pitches. You've got to have that good fortune sometimes."
Jamey Wright followed Price with a scoreless sixth before Wieters homered off Joel Peralta to lead off the seventh and cut the Rays' lead to one run. Jake McGee recorded the final out in the seventh before retiring the side in the eighth.
Tampa Bay had a chance to pad the lead after loading the bases with no outs in the eighth against Francisco Rodriguez, but Davis turned Yunel Escobar lineout to first into a double play when he threw to second to double off Wil Myers. Brian Matusz then retired pinch-hitter Jason Bourgeois to end the threat.
That led to closer Fernando Rodney taking over in the ninth.
Rodney entered the game with a one-run lead to protect but quickly got into trouble when Hardy singled to start the inning.
But with Markakis at the plate, Jose Molina made what Maddon called "the throw of the year" and nabbed Hardy trying to steal second.
"We're on the same page," said Rodney about what transpired with Molina. "He told me, 'Do the best you can with your slide step,' and it worked. He got a good throw, and we got the out."
Rodney walked Markakis before striking out Valencia and retiring Nate McLouth to end the game and nail down his 28th save.
"It's a weird game," summarized Rodney of the contest, which lasted three hours and 56 minutes.
Orioles outfielder Adam Jones noted that both teams played hard.
"They came out and they set us down with men in scoring position," Jones said. "We left  on base, that means we had 14 opportunities, in my eye. But Price is the pitcher he is because he knows how to get out of jams like that."