Former Mets farmhand John Gant, making just his second major league start, allowed only two hits in 6 2/3 innings to outpitch Matt Harvey in a 5-1 Braves victory Friday night at Citi Field.

Gant was one of two minor-leaguers the Mets sent to the Braves last year when they traded for veterans Juan Uribe and Kelly Johnson. Using a quirky herky-jerky motion, Gant hardly appeared a match for the powerful Harvey, but he was the dominant pitcher on this night, allowing only four baserunners.

Although his won-loss record doesn’t reflect it, Harvey turned his season around in the previous three starts before meeting Atlanta. He allowed a mere two earned runs in 20 innings (0.90 ERA), walking three, striking out 17 and holding opposing hitters to a .127 batting average in that stretch. At the same time, he was only 1-1 with one no-decision thanks to a lack of run support. Friday marked his 34th career start in which the Mets have scored two or fewer runs, and Harvey is 1-19 in those games.

Before the game, manager Terry Collins said Harvey’s confidence and attitude had improved dramatically over his previous three games as he regained his form. “He’s much more positive about things and much more confident,” Collins said. “He’s got a whole different demeanor to him recently. I see a huge difference about his body language on the mound and how he approaches it.”

The first inning should have elevated Harvey’s mood. He got the first three Braves out on only six pitches, and the Mets scratched out a run in the bottom of the inning in unusual fashion for them. Curtis Granderson laced a leadoff double into the gap in right-center and advanced to third on a ground out. The Mets are one of the least productive teams in driving runners home from third with less than two outs, but Granderson scored on a ground out to third by Yoenis Cespedes.

A leadoff walk to Erick Aybar in the third was unsettling for Harvey, who then gave up back-to-back run-scoring doubles to Ender Inciarte and Freddie Freeman with two outs to fall behind 2-1. Both drilled 96 mile-per-hour fastballs, and then Jace Peterson led off the fourth inning by crushing a 95 mile-per- hour fastball to left-center for a double. He scored on a one-out single by A.J. Pierzynski for a 3-1 Braves lead.

Another leadoff walk by Harvey (4-9) to Mallex Smith led to another Braves run in the fifth. Smith stole second and scored on a two-out single by Nick Markakis to push the margin to 4-1.

Meanwhile, Gant sailed through the Mets’ lineup, retiring 17 of 18 batters he faced and walking the other before Asdrubal Cabrera got the Mets’ second hit, a two-out double in the sixth. Gant got Cespedes to ground out to end that threat and got the first two outs of the seventh before being lifted when he walked Johnson.

The pitching change opened the door a crack for the Mets, but they failed to capitalize. Reliever Chris Withrow gave up a single to James Loney and walked Kevin Plawecki to load the bases. That brought a call for reliever Hunter Cervenka who struck out pinch hitter Wilmer Flores to get out of the inning.

Atlanta tacked on a run in the eighth when Chase d’Arnaud drew a leadoff walk, moved to third on a single by Aybar and scored when Cespedes dropped the ball and was charged with an error.

Notes and quotes: After hitting .300 in nine rehab games for St. Lucie, catcher Travis d’Arnaud joined Triple-A Las Vegas to fill the DH role Friday night in Salt Lake City. D’Arnaud is scheduled to catch on Saturday and Sunday as he works his way back from a right rotator cuff strain.