Barmes drew a bases-loaded walk for a 2-0 Pirates lead in the fourth inning, and, with Pittsburgh clinging to a 6-5 lead in the eighth, socked a solo homer to ice the contest.
Morneau scored two runs while Jose Tabata, Neil Walker and Pedro Alvarez each added an RBI for the Pirates, who took a third straight against the Rangers after being swept by St. Louis in their previous series.
They came into the contest trailing the National League Central-leading Cardinals by one game.
A.J. Burnett (8-10) got the victory despite allowing five runs on six hits over 6 1/3 innings. He walked two and struck out seven.
Rangers starter Matt Garza (3-4) yielded three runs on five hits through four full innings.
Elvis Andrus provided three RBI for Texas, which began Wednesday's action trailing AL West-leading Oakland by two games but holding a four-game cushion for a wild card spot.
Celebrity Families of 2014 [PHOTOS]