TORONTO -- Edwin Encarnacion has been working on his timing.
It could not have been better on Friday. The first baseman hit two home runs, including a grand slam, and drove in five runs in an eight-run seventh inning to lead the Toronto Blue Jays to a 12-6 victory over the Houston Astros.
"I was just trying to put the ball into play," Encarnacion said. "I hit the ball good but I didn't think it was going to go. The last few days I've been working on my timing and I have my timing back. I don't remember hitting two home runs in an inning before."
Adam Lind also homered in the seventh as the Blue Jays overcame a 6-4 disadvantage to win their second straight game after a seven-game losing streak.
Brett Lawrie and Jose Reyes added homers for the Blue Jays and Colby Rasmus had four hits before a crowd of 24,088 at Rogers Centre.
The Blue Jays tied a club record with 12 extra base hits.
"It did unravel rather quickly," Astros manager Bo Porter said. "They put some good swings on some pitches and you look up and it's an eight-spot. We have to do a better job of making quality pitches in those situations."
The Astros who have lost three in a row got four RBIs from Marc Krauss -- two on a second-inning homer and two on a fourth-inning double.
Blue Jays reliever Brett Cecil (4-1) picked up the win. Reliever Paul Clemens (4-4) gave up six runs in one-third of an inning to take the loss.
" I don't think you can get any better than that," Blue Jays manager John Gibbons said. "Edwin's having another great year. He's been steady all year. Early on he hit into a lot of tough luck early in the season. Since then, he has been one of the steadier players in baseball."
Astros right-hander Jordan Lyles allowed nine hits and four runs over five-plus innings. Blue Jays right-hander R.A. Dickey allowed seven hits, two walks and five runs and struck out eight in six innings.
"I picked a good night to be very mediocre," Dickey said. "Tonight the story is about Edwin. You don't see that very often."
The Astros took a 5-4 lead in the sixth after Brett Wallace, who doubled on a drive that popped out of the glove of center fielder Rasmus as he ran toward the wall, took third on a single by J.D. Martinez and came home when Krauss grounded into a double play.
Martinez later sprained his left wrist and will go on the disabled list.
The Astros added one run in the seventh against Dustin McGowan. Jose Altuve walked with one out, stole second and scored on a single by Jason Castro.
The Blue Jays answered with eight runs in their seventh. Encarnacion and Lind opened it with home runs against Clemens to tie the game 6-6.
Rasmus and Maicer Izturis followed with doubles to put the Blue Jays into the lead. Lawrie walked and Josh Thole was hit by a pitch to load the bases.
Left-hander Wesley Wright walked Reyes to make the score 8-6. Encarnacion hit his second homer of the inning and his 28th of the season on a 3-2 pitch from right-hander Hector Ambriz for a 12-6 lead.
Encarnacion's sixth career grand slam made him the first Blue Jay to hit two homers in an inning since Joe Carter on Oct. 3, 1993, at Baltimore.
"Good offensive teams will make a pitching staff not look so good some days and they didn't make us look very good," Lyles said.
"There was no inclination that they were going to hit balls hard." Clemens said. "I felt good out of the stretch, felt good with my command. I just got my butt waxed there for a minute. Now it's time to move forward."
The Astros took a 2-0 lead in the second on Krauss' second homer of the season after Wallace led off with a walk and was forced at second by Martinez.
Reyes led off the third with his sixth homer of the season to cut the lead to 2-1. Melky Cabrera followed with a doubled, took third on a balk, and came home on Bautista's sacrifice fly.
The Astros took a 4-2 lead in the fourth on a two-run double by Krauss that scored Wallace who led off with a single and Martinez who followed with a double.
Lawrie hit his seventh homer of the season with one out in the home fourth to cut the lead to 4-3. Encarnacion and Rasmus doubled in the fifth to tie the game 4-4.
NOTES: The series is the second ever between the teams in Toronto and the third overall. The Astros took two of three from the Blue Jays at Rogers Centre in 2011. The Astros swept a three-game series from the Blue Jays at Houston in 2005. ... INF Maicer Izturis walked in the second inning on Friday to reach base in 23 of his past 28 games. ... Krauss was making his seventh start in left field since being called up from Triple-A Oklahoma City on June 21. He has started two games in right field and two as DH. ... RHP Josh Johnson (1-6, 5.66 earned-run average) will start Saturday for Toronto against Houston LHP Dallas Keuchel (4-5, 4.42 ERA).