Brett Wallace and Chris Johnson both doubled and scored a run for the Astros, who have won consecutive games for the first time this season.
Houston starter Bud Norris did not factor in the decision after allowing three runs on 10 hits in six innings.
Daniel Murphy belted a two-run homer and Carlos Beltran added an RBI double for New York, which has lost nine of its last 10 games. R.A. Dickey (1-3) surrendered four runs and eight hits over eight full frame in defeat.
With the teams even at three, Pence crushed a 1-1 offering from Dickey over the left field wall to lead off the eighth.
Fernando Abad replaced Mark Melancon (2-1) in the bottom of the inning and promptly walked Angel Pagan. Jose Valdez took over on the mound after Murphy put men on the corners with a one-out single and fanned pinch-hitter Justin Turner on a pitch in the dirt that got away from catcher J.R. Towles.
An aggressive Pagan was thrown out at the plate trying to score, ending the threat.
Brandon Lyon tossed the ninth for his fourth save of the season.
The Mets loaded the bases with one out in the first inning, but failed to score.
Houston broke through with three runs in its next at-bat. Wallace doubled into the left-field corner to lead off the second and moved to third on a Johnson single. After Bill Hall was retired on a groundout, Wallace scored on Dickey’s wild pitch that was ball four to Towles. Norris and Michael Bourn then hit back-to-back RBI singles for a 3-0 Astros lead.
New York got on the board in the third, as Beltran’s two-out double plated Jose Reyes. The Mets tied the game in the sixth when Murphy followed a one-out double by Willie Harris with a home run inside the right-field foul pole.
The Mets have now lost seven straight home games…Reyes finished 4-for-5, while Beltran and Murphy both collected three hits…Hall left the game with a right ankle sprain.