Ian Kinsler also homered for the Tigers (60-80).
Richard Urena, a September callup, hit his first career home run for Toronto (64-77) and Jose Bautista hit his 22nd of the season. Both homers came against Detroit reliever Alex Wilson in the eighth inning.
Detroit starter Buck Farmer (4-2) allowed five hits, two walks and two runs (one earned) in five-plus innings. He struck out three.
Shane Greene pitched around a two-out walk in the ninth to earn his seventh save of the season.
Toronto starter Marcus Stroman (11-7) allowed six hits, one walk and four runs in six innings. He struck out six. He left his previous start Saturday in the second inning against the Baltimore Orioles when he was hit on the right elbow by a line drive.
The Blue Jays were trailing 4-1 after five innings when they caught a break in the bottom of the sixth. Jose Bautista reached first base on a strikeout when catcher James McCann was charged with a passed ball.
Justin Smoak singled and Kendrys Morales followed with an RBI single.
Drew VerHagen replaced Farmer and the Tigers turned a triple play that started on Kevin Pillar's grounder to third. It was the first triple play turned by the Tigers since Aug. 1, 2001, against the Seattle Mariners.
Kinsler smacked his 16th homer of the season in the seventh against Danny Barnes to give the Tigers a 5-2 lead.
Detroit reliever Daniel Stumpf entered the game in the seventh with one out and a runner at first base, and he induced an inning-ending double play from pinch hitter Rob Refsnyder.
Urena homered to lead off the bottom of the eighth and Bautista homered with one out to trim Detroit's lead to one run.
Castellanos hit his third career grand slam in the third inning to put the Tigers ahead 4-0.
Dixon Machado doubled with two out, Kinsler singled and Jeimer Candelario walked to load the bases for Castellanos, who blasted his 21st homer of the season to center field on the first pitch.
It was the first grand slam allowed by Stroman.
The Blue Jays scored once in the fifth.
Urena singled with two outs and came home on a bloop double by Teoscar Hernandez on a ball that popped out of the glove of diving center fielder Mikie Mahtook.
NOTES: Toronto 3B Josh Donaldson (illness) was a late scratch from the lineup when he was feeling "under the weather." ... Toronto OF/INF Steve Pearce (stiff lower back) left the game after the first inning Friday and OF Teoscar Hernandez replaced him. ... The Blue Jays recalled RHP Leonel Campos from Triple-A Buffalo Friday. He had been optioned to Buffalo on Aug. 29, one day after being recalled. ... Detroit 3B Nick Castellanos, who started 126 games at third base and six at DH, started in right field Friday. It was his first outfield appearance since 2013 when he played nine games in left field ... Tigers SS Jose Iglesias (paternity leave) did not play Friday. He was in Miami for the birth of his son. ... Detroit LHP Chad Bell (0-2, 5.98 ERA) opposes Toronto LHP Brett Anderson (0-1, 3.09) in the second game of the series Saturday.