Wade Miller (2-0) pitched seven scoreless innings for Houston even though he gave up seven walks. Miller allowed only two singles.
Five of the Astros' runs came off starter and loser Chris Carpenter (1-1).
Berkman homered in the fifth when Houston took a 5-0 lead and Bagwell hit his shot in the ninth.
A single by Scott Rolen drove in St. Louis' only run in the eighth inning.