Jeff Kent, a former Astro, hit a solo home run off Wesley Wright with one out in the 11th to end a four-frame scoring drought and, effectively, the game, 7-6.
"It was a fastball up and over the plate," Wright said of the home run pitch. "I wanted to get it in, but I left it out over the plate and he was able to hit it out into the Crawford Boxes. It's going to be a pitch I wish I could have back."
Brad Ausmus, Geoff Blum and Michael Bourn went down, in order, against Takashi Saito to finish the game.
Wandy Rodriguez had a shaky five-inning start that left Houston with a five-run deficit.
Rodriguez said his curveball and breaking ball were both off Tuesday night. He gave up a two-run home run in the first to Russell Martin to start the trouble.
"I tried to throw my ball outside to Martin, but I missed in the middle," he said. "That was my problem tonight. I missed a lot on location."
Rodriguez gave up one run in the third, fourth and fifth frames, and Oscar Villarreal gave up another in the sixth, but the Astros came charging back in that inning as Lance Berkman walked and Miguel Tejada singled to center.
Ty Wigginton's sixth home run of the season scored three, and a two-run double in the next inning by Carlos Lee, scoring Berkman and Bourn, tied the game at 6.
"These guys keep battling; they don't give up," manager Cecil Cooper said. "That's all we can ask for is a chance to win the game, and we felt like we had a chance."
The Astros had a shot in the ninth to walk off with the win. Hunter Pence singled to second base to bring up Berkman with two outs. But the slugger flied out to center to end the inning.
They missed a shot in the 10th with Mark Loretta on first as Wigginton grounded out.
Houston left seven stranded on 10 hits in the nearly four-hour game. Although Cooper was pleased with his team's drive, the players were frustrated with the loss.
"I don't believe in moral victories," Bourn said. "Either you win or you lose. We're always going to have the fight in us, regardless. We're not ever going to give up in the course of the game -- we've just got that kind of mentalities as a team."
Rodriguez (3-4, 3.08 ERA) allowed five runs on six hits in five innings of work, striking out five while walking four. He threw 93 pitches.
Dodger starter Clayton Kershaw (0-2) was denied his first win of his career, and Saito recorded save No. 13.
Krysten Oliphant is an associate reporter for MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.