Darren Oliver (0-2) hit speedy Rich Thompson with a pitch to lead off the inning, and one out later Upton smacked an Oliver offering into the left-field corner, scoring the game-winning run from first base.
Jake McGee (1-1) earned the victory with a scoreless top of the 11th for the Rays, who claimed the rubber match of a three-game series at Tropicana Field.
Upton finished 3-for-6 and Drew Sutton added a two-run double in the victory.
Tampa Bay starter James Shields struck out 10 over 7 1/3 innings, allowing two earned runs.
Blue Jays starter Ricky Romero, meanwhile, surrendered seven walks in six innings for Toronto, which dropped its 15th straight series in Tampa Bay.