The streaking Pirates rallied for a run in the eighth inning to break a tie and send the Astros to their club-record 12th consecutive loss, 4-3, before a large of crowd of 34,146 at Minute Maid Park.
The Astros last four losses have been by two runs or less, while the Pirates improved to 16-6 in their last 22 games and 9-1 in games in Houston this year.
"It's tough to lose any game really, but like I said earlier it just shows the kind of talent we have," center fielder Justin Maxwell said. "We're just right there from breaking through. As long as we don't get down mentally and keep grinding, we'll be fine."
A game that featured a pair of starting pitchers making their debuts with new clubs -- Wandy Rodriguez for the Pirates and Armando Galarraga for the Astros -- came down to the bullpens.
Pirates catcher Rod Barajas broke a 3-3 tie with a two-out single to left field in the eighth inning off reliever Fernando Rodriguez, the run charged to Chuckie Fick. The Pirates' bullpen retired 13 of the final 16 batters following Maxwell's two-run triple in the fifth that put Houston ahead, 3-2.
"If you let [the losing] take hold of you mentally, that's when it becomes a problem," Maxwell said. "If you have short-term memory and keep battling, we'll all be stronger in the future."
Wandy Rodriguez, who was traded to the Astros only days earlier, made his debut with the Pirates and took a no-decision after pitching six innings and allowing three runs, five walks and six hits. Watching Rodriguez pitch in black and gold was as awkward for his former teammates as it was for the fans.
"I tried not to think about it," Maxwell said. "He's got good stuff and the Pirates wanted him for a reason. I tried not to make eye contact and just play the game and look for the ball."
Wandy took a similar approach.
"Honestly, I just tried to concentrate on putting the ball where I wanted to," he said. "I didn't not think about 'I'm pitching against my old team.'"
Galarraga, who the Astros signed to a Minor League contract in May, had to work hard to keep his concentration as well. He was making his debut in Houston after getting called up from Triple-A Oklahoma City and working less than 24 hours after his wife gave birth to the couple's first child.
Galarraga drove from his home in Austin, Texas, on Saturday and went five innings, allowing three runs and five hits, in his first Major League start in more than a year.
The Pirates got solo homers from Alex Presley in the first inning and Neil Walker in the fourth to take a 2-1 lead, but Maxwell answered with a two-run triple to right field in the fifth to put the Astros back on top, 3-2.
"I didn't have the best sinker," Galarraga said. "I've been throwing a lot of good sinkers lately, the last couple games. I didn't feel like I had the best sinker tonight, but I kept the game close and we had the opportunity to win the game."
Galarraga, best known for his near-perfect game with the Tigers two years ago, is thrilled for a chance at a new baseball life in Houston.
"They gave me an opportunity by signing me when I got released from Baltimore, and now I just need to show I can pitch again and contribute," Galarraga said. "There's a lot of change that's happened here lately, there's a lot of new faces, so I just have to keep it together and throw the ball good."
In the sixth, the Pirates loaded the bases with no outs, and the Astros appeared on their way to escaping the jam when Pedro Alvarez hit into a 2-3 double play. But Carlos Corporan got crossed up on a Wesley Wright pitch and was charged with a passed ball that allowed Jones to score and tie the game.
"We gave them an opportunity to score runs and they were able to come up with a two-out knock there in the eighth inning," Astros manager Brad Mills said. "We got the big two-out knock from Maxwell, but leaving those other runs on was tough."