"It doesn't matter, as long as you win," Reds manager Dusty Baker said. "If you're going to be out there for that long, you might as well win. That was some game. It wasn't the prettiest game."
The second-place Pirates dropped their third straight game to the Padres while the Cardinals beat the Rockies to keep the Reds 2 1/2 games out of first place and a half-game behind Pittsburgh, where the Reds -- now a season-high 21 games over .500 at 87-66 -- will open a three-game series on Friday after a day off.
A Nationals loss to the Braves put the Reds' magic number to clinch the second NL Wild Card spot at five.
Part of a stretch of 6 2/3 innings of scoreless relief for the bullpen after Manny Parra was charged with two runs in the sixth, Reds reliever Alfredo Simon came through for a victory with three innings of work.
"I just tried to keep the game like that, until we could score the run," Simon said. "It was a big game for us. I tried to do the best I could to keep a zero on the board."
Simon, who pitched three innings on Monday, escaped a big threat in the 12th. Chris Carter hit a single to right field, followed by a sharp roller into right by L.J. Hoes. Simon struck out Matt Pagnozzi and with his 53rd pitch of the night, got Brandon Barnes to fly out to right field.
"That was about his limit," Baker said. "That's a very valuable man that reminds me of Pedro Borbon that can throw that much and still be effective."
In the top of the 13th against Jorge De Leon, Hamilton reached for the fifth time by drawing his second walk of the game. Hamilton then notched his fourth steal of the night by taking second, despite a pitchout, and became the first player in the live ball era to record four steals in his first start.
"My job is to steal bases, no matter how many I get," said Hamilton, who hit a two-out double in the second inning for his first big league hit. "That's an accomplishment to get four in one game. Who knows what comes next?"
What followed immediately was Shin-Soo Choo walking before a wild pitch to the bunting Brandon Phillips moved both runners. The infield was in when Phillips grounded out to third and Joey Votto's intentional walk loaded the bases.
Bruce came through by driving a ball off of the fence in left-center field to score Hamilton and Choo to give him three RBIs for the game and the team lead with 104 RBIs this season.
"It was nice for us to get it, especially out to a lead early with a chance to sweep," Bruce said.
"He's a really good hitter," Astros manager Bo Porter said of Bruce. "We walked him [intentionally in the ninth] with runners at first and third. That should tell you how much we think about him. He hurt us all three games."
Closer Aroldis Chapman pitched the bottom of the 13th with some drama as he walked two batters and gave up a hit and a run. But Chapman struck out Carter to end the game for his 37th save at just before 12:30 a.m. CT.
Earlier, Cincinnati had leads of 3-0 after two innings and 4-2 in the sixth, but couldn't keep them.
A golden chance to take the lead back was blown by the Reds with a 4-4 score during a poor top of the ninth. Reliever Josh Fields walked his first two batters -- Hamilton and Choo -- on eight pitches.
Presumably to avoid a double play, Phillips attempted a sacrifice bunt. The bunt was perfect, but the first baseman Carter's throw hit Phillips in the helmet as he hustled along the inside of the running lane. Phillips was ruled out on interference and both runners remained at first and second. First-pitch swinging as Hamilton attempted to steal again, Votto flied out to center field. Hamilton was able to tag up and take third base.
Bruce was intentionally walked to load the bases for Ryan Ludwick, who went to 3-0 before being called out on strikes to end the inning.
Cincinnati was 4-for-20 with runners in scoring position and stranded 15 while Houston was 3-for-21 and left 16 on base. The Astros were retired in order just once all night -- in the fifth inning by reliever Logan Ondrusek.
"We left a lot of men out there. They left a lot of men out there," Baker said. "We just couldn't get that hit. We knew it was going to be a bullpen night. We just didn't know it would be that much of a bullpen night."
It was a 4-2 Reds lead when Ondrusek gave up a one-out double to Carter before exiting in the sixth. The left-handed Parra took over and the Astros countered with the right-handed Hoes, who lined an RBI double to right field. Carlos Corporan made it three straight doubles with a blast over Hamilton running on the hill in center field to score Hoes and tie the game.
Then, both sides hunkered down for a long night.
"I'm not going to try and sugarcoat it. Those games aren't fun," Bruce said. "I think our team did a good job of keeping focus. That's what happens in these types of games. You lose focus for a little bit or guys give away at-bats. We didn't do that tonight. We pulled it out, which was a big one for us."