Ivan Rodriguez opened the bottom of the 10th with an infield single down the third-base line, his first hit with Houston after starting the season 0-for-7. Lance Berkman followed with another single off Neal Cotts (0-1) before Cubs manager Lou Piniella brought in Gregg.
Rodriguez advanced to third when pinch-hitter Jason Michaels flied out to center. Miguel Tejada was intentionally walked, loading the bases for Keppinger, who entered as a pinch-runner in the ninth.
Acquired from Cincinnati last week, Keppinger snapped his bat and stumbled out of the box on his grounder between third and shortstop that scored Rodriguez.
Houston earned its first win of the season after the Cubs won 4-2 on Monday behind Carlos Zambrano.
Aaron Miles reached base with two outs in the top of the 10th on a throwing error by Tejada at shortstop. Doug Brocail (1-0) retired Soriano for the third out.
Astros closer Jose Valverde pitched a scoreless ninth with two strikeouts. He was helped out when Tejada grabbed a grounder by Reed Johnson, spun all the way around and threw out Johnson at first.
Soriano's homer bounced off the railroad tracks atop the wall in left-center. He also homered on the second pitch of Monday night's game.
Bourn put the Astros on top 2-1 with his RBI single in the sixth.
Pence tied it at 1 with a homer to left-center in the fifth. It landed in a section of Berkman fans who dress up in puma costumes in honor of the slugger's nickname, "Big Puma." The group of more than a half-dozen waved the paws of their mustard yellow and white costumes and jumped around wildly as Pence circled the bases.
Kaz Matsui tripled later in the inning before Ryan Dempster walked Rodriguez. Dempster got out of the inning when Berkman struck out.
Ryan Theriot doubled and scored on a single by Derrek Lee in the third inning to make it 1-0 Cubs.
Dempster sailed through the first few innings and didn't allow a hit until a single by Tejada with two outs in the fourth.