Goldschmidt snapped a 1-1 tie with a two-out homer in the third, his 13th of the season.
Goldschmidt, who struggled in the first seven weeks of the season, came into Thursday's game hitting .559 with four homers and a 1.772 OPS in his previous eight games. That contrasts sharply with the .198 average the five-time All-Star had after play on May 22. Since May 23, Goldschmidt was hitting .403/.488/.847 entering Thursday's game.
The 14 homers by Peralta matches his total from last season and is just three shy of his career-high, which he set in 2015.
"It's a good sign, right?" he joked.
Peralta changed his setup at the plate during the offseason, lowering his hands so that he could elevate the ball more often, a trend in the game over the last couple of seasons.
"It's allowing him to get the barrel to the ball a little more frequently," D-backs manager Torey Lovullo said. "He's just a good hitter so I think he's focused so much on being a complete hitter by using the whole field, and now he's picking his spots to drive the ball."
Early in Spring Training, the change in hitting mechanics felt strange to Peralta, but he kept reminding himself to trust the process and by the time games rolled around he was far more comfortable.
"It's working really well right now," he said.
Yes it is, and the work that Goldschmidt did to shorten up his swing after his bad start is paying dividends now as well.
"I think Goldy is obviously the big catalyst for us here in the middle of this little run that we're on and everybody has kind of jumped on board with him," Lovullo said.
MOMENTS THAT MATTERED Contributions from everyone: Lost in the shuffle of the homers by Goldschmidt, Peralta and Lamb was the bases-loaded walk drawn by Nick Ahmed in the seventh. While a pair of solo homers in the eighth gave the D-backs a cushion it was the patient at-bat by Ahmed that drove in the decisive run.
"Nick had a really good bases-loaded walk that helped us get that run," Goldschmidt said. "It's going to take a total team effort. Hopefully different guys will just step up and that's what it's going to take for us to win."
HE SAID IT "He's a perfect leadoff guy for this ballclub. He sees a lot of pitches, left on left doesn't seem to faze him and he's an on-base percentage machine. And we want guys to get on base before those big boppers in the middle of the lineup and Jon's done a great job of that." -- Lovullo on outfielder Jon Jay
UP NEXT The D-backs continue their series with the Mets on Friday night with Zack Godley on the mound. The right-hander pitched well last time out against the Rockies as he allowed two runs over 5 2/3 at Coors Field. Godley has been a better a pitcher at Chase Field this year where he is 3-1 with a 2.93 ERA. Seth Lugo will start for the Mets.