The Phillies were slowed in their surge for an NL playoff spot for the second time in three games by the worst team in the big leagues. Philadelphia entered the day three games behind St. Louis for the final wild-card spot. The Cardinals played the Dodgers later Saturday.
Kyle Kendrick (9-11) struggled early and was done after just five innings, his shortest outing in more than a month. He gave up four runs on seven hits, including a two-run homer to Justin Maxwell.
The Phillies blew a 4-0 lead in Friday's 6-4 loss to Houston (47-99) to open the four-game series, a loss that snapped a seven-game winning streak.
Jose Altuve, Brett Wallace and J.D. Martinez added RBIs for the Astros, whose 34-23 record against Philadelphia since 2004 is tops in the NL.
Keuchel (2-7) lasted 5 1-3 innings to win for the first time since June 23 against Cleveland.
Four relievers combined to finish the seven-hitter.
Maxwell's two-run homer came with two outs in the first. It was Maxwell's 16th home run of the season. Altuve led off the inning with a single.
Altuve drove in Matt Dominguez in the second to make it 3-0 Astros. Wallace drove in a run with a ground-rule double in the fifth inning.
The Phillies loaded the bases in the first inning but failed to capitalize, with Ty Wigginton flying out to left to end the threat.
NOTES: Phillies manager Charlie Manuel said he plans to start C Carlos Ruiz every other game beginning Sunday. Ruiz, who pinch-hit Saturday, continues to recover from plantar fasciitis in his left foot, which landed him in the DL last month. . Astros infielder Tyler Greene will start at 2B on Sunday as manager Tony DeFrancesco gives Altuve some much-needed rest. ... SS Jimmy Rollins stole two bases, giving him 29 for the season, including a major league-leading 12 steals of third base.