Bagwell recorded his 358th career home run, moving him into a tie with Yogi Berra for 57th on the all-time list. The Astros were trailing by two in the bottom of the sixth inning when Bagwell hit his ninth home run of the season. The blast came off Ron Villone (2-5) and put Houston in front for good, 5-4.
Ensberg collected his third home run of the season as Houston matched its longest winning streak ever at Astros Field with a seventh straight victory. The Astros also won seven in a row from Aug. 16-30, 2001.
After Bagwell powered his team into the lead, the Astros bullpen shut down the Pirates. Ricky Stone (2-1) pitched 2 1/3 hitless innings, Pedro Borbon struck out Brian Giles -- the only batter he faced in his Astros debut -- and Octavio Dotel pitched a scoreless ninth to record his first save.
In his previous at-bat, Giles hit a 415-foot homer into the upper deck in right. But the Pirates lost for the fifth time in their last six games.
2014: NFL Cheerleaders [PHOTOS]
Michael Sam cut from the Dallas Cowboys