Garrett Hampson had four hits for the Rockies, who swept the three-game series and improved to 28-16 at home.
Colorado is just 6-31 on the road. A day after being no-hit by Germán Márquez for eight innings the Pirates jumped on Gray for their first runs of the series.
Adam Frazier led off the game with a triple, scored on a sacrifice fly and Bryan Reynolds homered for a quick 2-0 lead. It was Reynolds’ 14th of the year.
Gray (5-6) didn’t give up another hit before leaving four a pinch hitter in the sixth. He walked four — one intentional — hit a batter and struck out five to continue the strong run of outings by Colorado starters.