The Astros have won a season-best four games in a row.
Pence had four hits, including an RBI single in the first, his homer in the seventh and a run-scoring single in the eighth.
The home run tied the game at 4-4 and the Astros went ahead later in the seventh when Carlos Lee scored on a throwing error by shortstop Clint Barmes.
Miguel Tejada had a single for Houston, extending his hitting streak to 17 games.
The win went to Tim Byrdak (1-1), who worked a scoreless seventh inning in relief. Chris Sampson got his third save by recording the final six outs.
Jason Marquis (7-4) suffered the loss while giving up five runs in six-plus innings.
Houston has defeated Colorado five straight times.
Copyright 2009 by United Press International.