Brian Moehler posted yet another solid start, allowing one run on four hits in seven innings, and a couple of Houston players who had been struggling prior to the All-Star break came through to secure the win.
With the score tied at 1 in the bottom of the ninth, Miguel Tejada hit a leadoff double to right field.
Hunter Pence did not hesitate to hit a shot to left-center field, and Tejada charged home, easily safe as Cubs catcher Geovany Soto dropped the ball at the plate.
Pence, who took just one day off during the four-day break to work on his hitting, went 3-for-4 with a double.
"I just came in here when no one was here and turned on the pitching machine and basically just worked my eye," Pence said. "It definitely gave me some confidence. Before, I felt a little lost. I never really tried that machine before, but I thought, 'What the heck, take a chance.'"
Pence and the rest of the team were trying hard to support a stunning performance by Moehler, who only allowed a solo homer to Jim Edmonds.
Manager Cecil Cooper said Moehler stayed ahead of hitters, throwing strikes early and perfectly spotting his pitches.
"We just worked the ball in and out, up and down tonight," said Moehler, who threw 87 pitches, 59 for strikes. "My last two starts had been a little too nitpicky around the zone, and tonight I just tried to hit a little bit more of the plate."
Chicago's pitching was stingy as well. Ted Lilly allowed one run on six hits in seven innings, striking out six.
Pence said it felt like Lilly had three different fastballs to add to his curve and changeup pitches.
"He's got kind of a deceptive delivery," Cooper said. "He comes over the top, throws a lot of high fastballs at 87 or 88 [mph], then he has a curveball that comes out of the same plane ... and then all of a sudden it drops out of the sky on you. He was real effective tonight. I just thought our guy matched the intensity."
Carlos Lee was able to figure Lilly out in the seventh frame after six scoreless innings. His leadoff home run to the Crawford Boxes in left field, No. 22 on a 1-1 count, tied the game.
Geoff Geary, who replaced Moehler, was equally impressive, retiring the side in both the eighth and ninth frames with one strikeout.
Cooper said Geary's strong relief outings have given him confidence in the right-hander.
"Our goal in the bullpen is to minimize as much damage as possible," Geary said. "There is no thought of hopefully you keep it close, give up one run. I want to put up as many zeroes as I can. The performance that Brian gave us today was outstanding. For me to come in and follow his lead was tough, but I did my best."
Tejada went 3-for-4, including his double, despite getting two fewer days off than most of his teammates.
"I feel happy for myself," he said. "I came out today really strong. The good thing was the All-Star Game. I enjoyed being there, and it made me strong for the second half."
The Astros knocked one game off their 13-game deficit behind the Cubs, who are leading the National League Central.
Krysten Oliphant is an associate reporter for MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.