Arizona won its third in a row while the Rockies fell for the fourth time in five games. The Colorado slump followed an eight-game winning streak.
Trevor Cahill (1-3) allowed only an unearned run through five innings to get the win.
Josh Collmenter gave up a run on two hits during three relief innings and J.J. Putz survived a one-out walk in the ninth to earn his fourth save.
Wil Nieves put Arizona in front with an RBI single in the second, but Colorado tied it with a run in the fourth when Martin Prado committed a fielding error at third base on a grounder from Yorvit Torrealba.
Prado reached base on an infield single in the bottom of the fourth and scored when Goldschmidt hit an 0-2 pitch over the wall in right.
Jorge De La Rosa (2-2) gave up the homer to Goldschmidt and suffered the loss in a seven-inning effort.
Notable deaths of 2014 [PHOTOS]
Michael Sam cut from the Dallas Cowboys