PHOENIX -- Ian Kennedy focused more on Arizona's victory than the three home runs he gave up to one hitter.
"Erase him out of the lineup and I would have done maybe a lot better," Kennedy said. "But we won and that's the important thing."
Miguel Montero homered, scored twice and drove in a pair of runs for third-place Arizona (51-50), which has won eight of 11 to move within 4˝ games of NL West-leading San Francisco. Gerardo Parra added three hits and two RBIs.
New York managed nothing on offense besides Davis' solo shots and lost for the 14th time in 16 games. After an encouraging first half, the Mets are 5-17 in July.
"It's bittersweet, for sure," Davis said.
Davis connected in his first three at-bats, all against Kennedy. The first baseman added a single in the eighth and finished 4 for 4, raising his batting average to .216. He was on deck when J.J. Putz struck out David Wright with two on for his 19th save in 22 chances.
A former Arizona State star from nearby Scottsdale, Davis became the ninth Mets player to hit three homers in a game -- all on the road. Carlos Beltran was the last to do it on May 12, 2011, at Colorado.
"It is a positive thing, but obviously I don't want to hit .216 for my career," Davis said. "I want to get base hits, too, and not just home runs. If I am hitting just home runs, at least I am helping the team in that way."
Davis leads the Mets with a career-high 20 home runs this season. He has three career multihomer games.
He homered to straightaway center field in the second and fourth, both well above the yellow line on the backdrop for the batter's eye -- one of the deepest parts of Chase Field.
"I even hung a curveball to try something different. I threw good ones and he fouled them off," Kennedy said. "I hung one and it still didn't make a difference. It was just jaw-dropping. I guess he made SportsCenter."
Davis pulled a drive down the right-field line in the sixth, making him the seventh major leaguer to go deep at least three times in a game this season.
With a chance to tie the major league record of four homers in a game, Davis singled to right field in the eighth inning against David Hernandez.
"It's still not where I want to be, but it's definitely getting better," Davis said.
Kennedy (9-8) said his command has been better in his past three starts, a key to his success. He allowed seven hits in 6 1-3 innings while striking out nine. His streak of 85 straight batters faced without a walk ended with a fifth-inning pass to Ruben Tejada.
The Diamondbacks got a run in the first after Parra singled, then beat the throw home on a double to left-center by Aaron Hill.
Davis tied it in the second with his first home run. Arizona responded with recent call-up Ryan Wheeler's first extra-base hit, a double to right-center to drive in Montero and give the Diamondbacks a 2-1 lead.
Parra singled in Wheeler with two outs, but was caught too far off first base on the cutoff throw and was tagged out.
The inning featured a tough defensive play by Tejada, who slid under Wright in foul territory down the left-field line to catch a popup.
Montero's fourth-inning homer, his 11th of the season, was a two-run shot that gave the Diamondbacks a 5-2 lead.
"He's been swinging the bat good. I gave him the day off the other day to try to keep him fresh," Diamondbacks manager Kirk Gibson said. "Guy kind of threw a breaking ball, (he) went down and got it."
Parra's two-out single drove in Wheeler after a walk and a sacrifice.
Davis led off the sixth with his third home run of the game, a line drive over the fence near the right-field corner.
Mets starter Chris Young (2-5) lasted four innings, his second-shortest outing of the season. He allowed six runs on seven hits and threw 68 pitches.
New York put runners at the corners with one out in the eighth, but Hernandez got out of it. Putz whiffed pinch-hitter Scott Hairston and Wright with two on to end it.
"We haven't been able to come up with some offense," Mets manager Terry Collins said. "Today, 15 strikeouts. That is not how we swing the bat."
Diamondbacks OF Justin Upton has eight home runs after hitting 31 last season. Asked about the power drought, Gibson said Upton might have a timing issue, adding that he's also been a more selective hitter this season. Upton is waiting on more off-speed pitches and looking to make contact more than hitting for power, Gibson believes. "He's not that far off," the manager said. ... Gibson said he hasn't spoken with general manager Kevin Towers since the Diamondbacks traded INF Ryan Roberts on Tuesday, and while noting that Towers is always busy and "when he's around me, his phone rings all the time," no deal seems imminent with Tuesday's trade deadline approaching. ... Mets CF Andres Torres, who entered in the fifth, made a running catch with his back to the infield in deep center field in the seventh, stealing a hit away from Parra.