New York rallied to tie it with two runs in the eighth, but the Mets' hopes of reaching extra innings ended when Goldschmidt hit a 1-1 pitch from Scott Atchison (2-1) over the wall in right. It was Goldschmidt's 27th homer of the year, easily a career high in his three major league seasons.
Brad Ziegler (5-1) struck out one while working a perfect top of the ninth to get the win.
Arizona won its third in a row and the Mets had a three-game winning streak snapped.
NBC reportedly holds celebs hostage to Jimmy Fallon's show
Millions of Getty images now available for free via embed tool