Justin Upton added a home run and Henry Blanco went 2-for-3 with two RBI as the Diamondbacks won their sixth straight overall.
Arizona survived the loss of Jason Marquis, who suffered a fractured right fibula in the fourth inning. Zach Duke (3-4) worked 2 2/3 innings in relief of Marquis, allowing two runs on four hits to earn the win.
David Hernandez tossed a perfect ninth to record his 11th save of the season.
Chris Capuano (9-11) allowed four runs on nine hits over six innings to suffer the loss. He struck out six and did not issue a walk.
Angel Pagan had three hits and Lucas Duda went 2-for-3 with a solo homer and two RBI for the Mets, losers of five in a row.
In the third, Marquis took a Pagan line drive off his lower right leg but remained in the game.
Duda began the fourth with a homer and, two batters later, Marquis collapsed to the ground after hitting Josh Thole with on 0-2 sinker. He limped off under his own power.
“Based on what the doctor was saying, he beleives its the fibula,” said Marquis. “The bone in my leg broke on the line drive I got hit with. On that last pitch to Thole, on the push off, I just felt something pop. [The doctor] said it just pretty much completed the break.”
The Diamondbacks awoke in the home half. Consecutive one-out singles by Ryan Roberts and Sean Burroughs placed runners at the corners. Goldschmidt drove Roberts in with a ground-rule double to left, and Burroughs crossed the plate on Capuano’s wild pitch.
The Mets jumped back on top a half-inning later. Pagan began the frame with a single and scored on Justin Turner’s double. Duda followed a David Wright groundout with a run-scoring base hit up the middle.
Upton tied things up with a solo shot in the home half and consecutive two-out doubles from Goldschmidt and Blanco gave Arizona the lead an inning later.
“I made some good pitches,” said Capuano regarding Upton’s homer. “I threw him a couple tough breaking pitches. I tried to come back with that same pitch, front door, two-seemer inside and just didn’t get it in quite as well as I did the last one.”
Ryota Igarashi began the bottom of the eighth for the Mets and hit Roberts, walked Burroughs and allowed a Goldschmidt single to load the bases. Blanco followed with a walk to seal the final margin.