They were able to escape with a win despite all the traffic on the bases by making big pitches when it mattered most.
Yuli Gurriel had two hits and drove in two runs as the Astros built a lead with a big first inning and held on for the 5-4 victory.
The Astros jumped on Detroit starter Edwin Jackson (3-6) for four runs in the first inning to go on top 4-1. They led by 3 when Detroit's Ronny Rodriguez hit a solo homer in the sixth before Travis Demeritte added one in the seventh to cut the lead to 5-4.
Detroit had runners at first and third with two outs in the eighth, but Will Harris struck out Demeritte to preserve the lead. Roberto Osuna allowed one hit in a scoreless ninth for his 28th save as the Astros won their second straight after losing five in a row.
"We had to work pretty hard for that win and I think our pitching staff (was) able to get some key punch outs when we needed it," manager A.J. Hinch said. "We stranded a lot of their runners, we had a big first inning with some two-out hits and we won ... credit to a lot of different guys."
Houston starter Wade Miley (12-4) allowed a season-high 10 hits, but just one of them was for extra bases, and three runs in 5 2/3 innings to win his sixth straight decision. He struck out eight without a walk.
The Tigers were 1 for 8 with runners in scoring position and stranded 11 runners.
Detroit designated hitter Miguel Cabrera had two hits and drove in a run before he was ejected for arguing balls and strikes in the fifth inning. Manager Ron Gardenhire was also ejected in that inning after yelling at home plate umpire Alfonso Marquez about Cabrera's ejection.
Gardenhire didn't speak to reporters after the game, with bench coach Steve Liddle talking instead.
He said Gardenhire was simply taking up for Cabrera.
"That was something that really irritated Ron and you can talk to him about it (Tuesday)," Liddle said.
Jackson yielded seven hits and five runs -- four earned -- in six innings for his first loss with the Tigers this season after winning his first two starts.
The Tigers led 1-0 after an RBI single by Cabrera in the first inning.
Alvarez hit an RBI double to tie it in the first inning. There were two outs in the inning when Gurriel doubled to center field on a ball just out of reach of Victor Reyes that scored two more and put Houston on top 3-1.
Robinson Chirinos followed with a single and he reached second and Gurriel scored on an error by left fielder Brandon Dixon on the play.
Demeritte and Cabrera hit consecutive singles with one out in the third inning and Demeritte scored on a sacrifice fly by Dixon which cut the lead to 4-2.
Jackson got on track after his tough first inning and pitched three scoreless innings before the Astros added a run on a sacrifice fly by Chirinos with one out in the fifth. Cabrera and Gardenhire were ejected with Alvarez at the plate with no outs in that inning.
After Cabrera was tossed, Gardenhire stormed out of the dugout screaming at Marquez. Gardenhire got right in his face and went on a profanity-laced rant that continued well after he'd been ejected. He finally made his way off the field as boos rained down from the home crowd.
Cabrera denied that he was complaining about balls and strikes and said he was speaking in Spanish to Altuve, who was on deck when he was thrown out.
"If you see the pitch he threw me out, it was down," Cabrera said. "So, there's no reason for me arguing that pitch. So, I said `It's unbelievable' ... I said that to Altuve not the umpire. When Gardenhire went over there he said he warned me three times but Gardenhire said, `He didn't even talk to you."
There were two outs in the sixth inning when Rodriguez homered to center field to get the Tigers within 5-3. Demeritte sent Hector Rondon's third pitch of the seventh inning to center field for a home run to cut the lead to 5-4.
Astros: RHP Gerrit Cole did some work on the field before Monday's game and manager A.J. Hinch is hopeful that he'll make his start on Thursday after being scratched from his start on Tuesday with discomfort in his right hamstring.
Monday was the first game since the Astros extended protective netting further down the left-field and right-field lines at Minute Maid Park. The move comes after a 2-year-old girl suffered a skull fracture when she was struck by a foul ball during a May game in Houston.
Tigers: RHP Spencer Turnbull (3-11, 3.75 ERA) will start for Detroit on Tuesday night. Turnbull allowed six hits and three runs while striking out eight in five innings of a loss against the Mariners in his last start.
Astros: RHP Aaron Sanchez (5-14, 5.79) is scheduled to start for Houston on Tuesday. Sanchez yielded seven hits and six runs in 5 1/3 innings in his last start but did not factor in the decision in a 7-6 loss to Oakland.
More AP MLB: https://apnews.com/MLB and https://twitter.com/AP-Sports
Reds win again in extras, beat Rockies 6-5 in 12 innings
— Nick Castellanos hit a tiebreaking double in the 12th and the Cincinnati Reds kept up their success in extra innings, beating the Colorado Rockies 6-5 on Saturday night.
Bauer K's 10, Muncy has 3 hits as Dodgers blank Marlins 7-0
— Trevor Bauer threw seven shutout innings and struck out 10, Max Muncy had three hits and the Los Angeles Dodgers defeated the Miami Marlins 7-0 Saturday night to extend their winning streak to four.
Reds use small ball to go ahead in 12th
Nick Castellanos' RBI double and Eugenio Suarez's RBI groundout put the Reds ahead 6-4 in the 12th.
Haniger, Moore homer, Mariners beat Indians 7-3
— Mitch Haniger hit his 12th home run, Justus Sheffield picked up a win against the team that drafted him and the Seattle Mariners beat the Cleveland Indians 7-3 on Saturday night.
Farmer launches HR in 11th to put Reds ahead
Kyle Farmer's 412 foot two-run shot in the 11th lifts the Reds to a 4-2 lead over the Rockies.
Pham, Kim, Nola homer in Padres' rout of Cardinals
Tommy Pham, Kim Ha-seong and Austin Nola all hit home runs in the Padres' 13-3 win vs. the Cardinals