Pence went 3-for-5 with two runs scored while Angel Sanchez had two hits, two RBI and two runs scored for the Astros, who had dropped their previous three games.
Brett Myers (14-7), making his 32nd start of the season, extended his club record by going at least six innings for a 32nd straight start. He went six innings on Friday, but it was a shaky outing as he gave up six runs -- five earned -- on six hits with four walks. It was enough, though, to earn him his sixth straight winning decision.
Garrett Jones drove in four runs while Pedro Alvarez had two RBI for the Pirates, who reached the 100-loss plateau for the first time since 2001. James McDoanld went four innings in the start and was charged with three runs on five hits. Chris Leroux (0-1) suffered the first loss of his career as he gave up three runs on three hits while recording just one out in the sixth.
The Astros plated two runs in the first on an RBI single from Pence and a sacrifice fly off the bat of Jeff Keppinger for a 2-0 lead.
Pittsburgh got one back in the bottom of the first on an RBI groundout from Jones that plated Andrew McCutchen, but Sanchez's RBI single in the second gave Houston the run back.
A two-run double from Jones in the third that plated Jose Tabata and Neil Walker tied the game for Pittsburgh.
The Astros went back on top in the fifth. With one out, Pence singled, moved to second on a Keppinger single and crossed the plate when Chris Johnson singled for a 4-3 lead.
Pittsburgh surged back in front in the fifth on a sac fly from Jones followed by an RBI double from Alvarez for a 5-4 advantage.
Houston, though, answered in the sixth to take the lead back. With men on first and second, Sanchez singled to score one. Pence followed with a two-run double and an RBI single from Keppinger later in the inning made it an 8-5 game.
Andy LaRoche hit a two-out, solo homer in the bottom of the sixth while Alvarez added a sacrifice fly after a Jones triple in the seventh to make it a one-run game.
Humberto Quintero and Geoff Blum each had an RBI single in the ninth to give Houston some insurance and Brandon Lyon worked around a two-out single in the ninth for his 19th save of the season.
The Pirates have recorded a losing season in 18 straight campaigns, which is an MLB record. The team last lost more than 100 games in 1985 when they dropped 104 contests...Houston has won 11 of the 13 games against Pittsburgh this season...Myers, who tied his career-high in wins set in 2003, improved to 6-4 over 12 meetings against the Pirates. He has also set a career-high in innings pitched this season with 218.