The win brought the Rockies into a tie with the D-backs for the top National League Wild Card spot.
Jon Gray kept the Rockies in front, giving up just one run on six hits in seven innings. It was Gray's second straight quality start following his three-run, seven-inning outing in Washington last Sunday, the first time this season he has thrown consecutive quality starts.
After Pivetta left, Phillies reliever Mark Leiter shut down the Rockies' offense with 4 1/3 scoreless innings, with nine strikeouts. His nine strikeouts were the most by a Phillies reliever since Lowell Palmer fanned 10 on May 3, 1970.