With pinch-runner Kevin Pillar aboard after Dioner Navarro opened the bottom of the ninth with a single, Anthony Gose dropped a nice bunt down the first-base line. Reliever Juan Carlos Oviedo (1-1) threw wide to first and Pillar came all the way around to score the winning run.
Aaron Loup (2-1) worked one inning of relief for the win as Toronto completed a three-game sweep. The American League East-leading Blue Jays improved to 32-22 while the Rays fell to 23-31.
Toronto struck early with two runs in the first inning.
Jose Reyes kicked off Tampa Bay starter Chris Archer's 26-pitch frame with a single up the middle. He moved to third when Jose Bautista hit a flare into shallow right field and both runners scored on Edwin Encarnacion's single.
The Rays tied it in the second inning. Matt Joyce took a Liam Hendriks pitch off the centre-field wall for a double and Wil Myers followed with a two-run shot, his fifth homer of the season.
Gose made an all-world play in centre field to keep the game tied in the third inning. He caught up to a James Loney drive and made a beautiful jumping catch against the wall to retire the side.
Hendriks pumped his fist in the air and the crowd of 17,309 gave Gose a hearty ovation as he returned to the dugout.
Toronto put runners on the corners with two outs in the fourth after singles by Brett Lawrie of Langley, B.C., and Gose but Reyes struck out looking.
In the sixth, Melky Cabrera offered a defensive highlight of his own when he robbed Longoria of extra bases with a great leaping catch against the wall in left field.
Lawrie and Encarnacion got into the act too when Loney hit a hard chopper that the Canadian sprawled to retrieve in shallow right field. Encarnacion dived to snag the throw to first and managed to keep his foot on the bag for the out.
Hendriks, a 25-year-old Australian right-hander making his second start as a Blue Jay, was taken to the warning track several times but prevented the Rays from pulling away. He lasted six innings, giving up two earned runs and three hits while striking out five.
Left-hander Rob Rasmussen came on for the seventh and Joyce greeted him with a ground-rule double. Toronto manager John Gibbons quickly went to the bullpen for Dustin McGowan, who recorded three flyouts to keep the game tied.
Joel Peralta relieved Archer in the seventh and gave up a single to Reyes and a two-out walk to Bautista. Southpaw Jake McGee entered the game to face Lind, who came in with a .133 average against left-handers.
With Reyes bolting for third base, Lind struck out looking to end the threat.
Toronto third baseman Juan Francisco took his turn in the defensive spotlight with a great diving snag off the bat of leadoff hitter David DeJesus in the eighth. McGowan retired the side in order.
In the ninth, Loup gave up a two-out walk to Myers. Lawrie, who moved from second to third base when pinch-hitter Steve Tolleson entered the game, made a brilliant play by barehanding a slow chopper and throwing out former teammate Yunel Escobar.
Archer gave up six hits, two earned runs, two walks and struck out seven. The game took three hours 23 minutes to play.
Notes: Toronto closer Casey Janssen was given the day off to rest after picking up his eighth save in eight opportunities the night before. Fellow reliever Sergio Santos (elbow) felt some discomfort during a throwing session and may try again Sunday, Gibbons said before the game. ... The Blue Jays will wrap up their 10-game homestand with a four-game series against the Kansas City Royals beginning Thursday night. Knuckleballer R.A. Dickey (5-4) is scheduled to start for Toronto against fellow right-hander James Shields (6-3). ... The Rays will continue their eight-game road trip with a visit to Boston. ... Loney hit a towering shot in the fourth inning that curled foul just before reaching the foul pole. After an umpire review of 90 seconds, the call stood. ... The Rays challenged the call on Lawrie's infield single in the fourth. A 32-second review confirmed the call. ... Entering play Wednesday night, the Blue Jays were tied for second in the major leagues with 31 wins, two behind San Francisco.
Follow @GregoryStrongCP on Twitter.