Harrison, the next batter, served a single to left and Barmes beat the throw home for the winning run, which gave the Pirates the rubber match of a three-game series at PNC Park.
Tony Watson (3-0) picked up the victory with a scoreless top of the 12th.
Bucs starter A.J. Burnett yielded two runs on six hits in an eight-inning performance, issuing no walks and striking out four.
Wandy Rodriguez pitched well but got a no-decision for Houston, surrendering only one run on three hits over eight frames while fanning seven.
Putin thinks Obama would save him if he were drowning
Chipotle plans first price increase in 3 years