Philadelphia lost three of four against Houston to fall 3 1/2 games behind St. Louis and Los Angeles in the National League wild card race.
Carlos Corporan and Scott Moore homered for the Astros, who remained one loss away from reaching 100 for the second straight season.
Wesley Wright (2-2) pitched a scoreless seventh to pick up the win. Wilton Lopez got the last five outs for his sixth save.
Jose Altuve reached on an error by third baseman Michael Martinez to begin the seventh and Jimmy Paredes was walked by Antonio Bastardo (2-5). Pinch hitter Brandon Laird walked off Phillippe Aumont to load the bases with one out.
Maxwell's double down the right-field line that just found chalk put the Astros ahead 5-4, and Dominguez followed with his two-run single.
After Dominguez moved to second on a passed ball, Justin De Fratus intentionally walked pinch hitter Jason Castro one out later but got Tyler Greene to ground out to end the inning.
Domonic Brown sliced the lead to 7-6 with a two-run double off Mickey Storey in the eighth. Lopez, however, struck out pinch hitter Laynce Nix and got a grounder from Nate Schierholtz to end the inning.
Jimmy Rollins led off the ninth with a single and moved to second on Erik Kratz's fly ball to right. Lopez got Chase Utley to fly out to left and intentionally walked Ryan Howard before Carlos Ruiz grounded to first to end the game.
Phillies starter Roy Halladay gave up three runs on six hits with seven strikeouts in six innings, remaining two wins shy of 200 for his career.
Jordan Lyles gave up four runs on five hits with four walks and six strikeouts in five innings for Houston. Lyles has gone longer than five innings just once in his last six starts.
Philadelphia scored three runs in the fifth to take a 4-2 lead. Rollins singled with two outs, stole second and moved to third on Corporan's throwing error. Juan Pierre followed with a run-scoring double to left field.
Lyles intentionally walked Utley, and Howard followed with a a two-run double to left but Howard was thrown out trying to stretch it to a triple.
Corporan's solo homer in the sixth pulled Houston to 4-3.
Philadelphia took a 1-0 lead in the first on Utley's sacrifice fly.
Moore's two-run homer in the third put the Astros ahead 2-1.