CLEVELAND -- It certainly didn't come easy.
The game went down to the final pitch. With two outs in the ninth inning, the Astros had the tying run at first and the league's leading hitter, Jose Altuve, at the plate.
Indians closer Cody Allen struck him out.
"Cody knew he was going to have to reach back for something there," Francona said.
"We were hoping Altuve wouldn't come to the plate, but it figures," said Francona.
Carlos Carrasco (11-7) pitched into the eighth inning to get the win, while Allen picked up his 25th save.
The loss snapped Houston's three-game winning streak.
Trailing 3-2, the Indians took the lead for good in the fifth inning when they sent eight men to the plate in a four-run rally. All of the runs were charged to Houston starter Doug Fister (12-11), who never made it out of the fifth.
Fister pitched 4 1/3 innings, allowing six runs and nine hits with two strikeouts and three walks.
"He had a hard time executing his pitches. A lot of misfires, which isn't normal for him," said Houston manager A.J. Hinch.
Lindor had three singles, his major league-leading 23rd three-hit game of the season. That's the most three-hit games in a season by an Indians player since 1936 when Earl Averill had 29 and Hal Trosky had 24.
Carrasco gave up four runs and nine hits with five strikeouts and one walk.
After giving up a one-out double to Evan Gattis in the eighth, Carrasco, leading 6-3, was removed from the game. Andrew Miller relieved Carrasco and gave up a two-run homer to Yuli Gurriel. Suddenly it was 6-5.
"Andrew threw one too many (sliders) in a row, and he left one up," said Francona.
It was the first major league home run for Gurriel, the 32-year-old Cuban native who signed a five-year contract with the Astros in the middle of July.
"He's a good hitter, and he found the barrel against a really good pitcher," Hinch said.
The Indians took a 1-0 lead in the bottom of the second on an RBI single by Roberto Perez, but an RBI single by Altuve in the second tied it. Lonnie Chisenhall's RBI single in the third gave Cleveland a 2-1 led.
In the top of the fourth while pitching to Gurriel, Carrasco got a bug in his eye. He took a knee behind the mound and needed a few minutes, and some assistance, to get the bug out.
"The bugs were everywhere. They were all over the place," Francona said.
Carrasco's first two pitches after the bug became hits. Gurriel singled and Colby Rasmus belted a two-run homer over the right field wall to give Houston a 3-2 lead.
"I missed my spot and he got it," said Carrasco.
The Indians regained the lead with a four-run fifth, the first two runs coming on Napoli's home run, his career-high 31st, deep into the left field bleachers, giving the Indians a 4-3 lead.
"That changed the game," Francona said. "We went from losing to winning."
Later in the inning pinch hitter Brandon Guyer stroked a two-run double, extending Cleveland's lead to 6-3.
"I feel like I haven't come through for the team much lately, so that felt really good," Guyer said.
"The whole fifth inning was a mess from the get go," said Hinch. "We needed our guys to get outs and their hitters executed."
NOTES: Astros SS Carlos Correa has an inflamed left shoulder and has been sent back to Houston to get it examined. Rookie 3B Alex Bregman, who was drafted as a shortstop but has played mostly third base since joining the Astros, started at short in place of Correa. ... C Evan Gattis has 16 home runs at his position this season. That ties the Astros' record for most homers by a catcher, done previously by Juan Castro in 2013 and John Bateman in 1966. ... Indians C Yan Gomes started his first game at catcher on an injury rehab with Triple-A Columbus on Wednesday. Gomes had been used as a DH in his other rehab games. He has been on the disabled list since July 18 with a separated right shoulder. ... RHP Mike Clevinger will come out of the bullpen for a second consecutive start on Saturday versus Minnesota. Clevinger is starting in place of slumping RHP Josh Tomlin.