NEW YORK -- Mets lefty Jacob deGrom doubled over like he was going to puke.

He probably didn't look too different than all those who were calling for Brett Gardner to lose his job earlier this year.

Gardner was the difference in the Yankees' 4-1 win over the Mets at Citi Field on Friday night, his two-run shot breaking a 1-all tie in the eighth inning.

It came off deGrom, who otherwise looked like the ace he's been over eight innings. deGrom left an 87-mph changeup over the middle of the plate and Gardner hammered it. When he crossed second base, he let out a big, "Woo!"

"It's fun to watch. That guy's had some big homers for us, some big hits," said Giancarlo Stanton, who followed with his own home run, a solo shot, in the ninth inning that created the final score.

Gardner finished 2-for-3 and has a seven-game hitting streak, tying his season-best. He's also got a hit in 14 of his last 15 games since May 18.

Over his last 21 games, he's hitting .364 (32-for-88) with 13 extra-base hits (seven doubles, two triples, four home runs) and 11 RBI.

His .268 batting average has jumped 70 points since he hit .198 with a putrid .578 OPS through his first 29 games.

After his rough run, Gardner -- the longest-tenured Yankee who was part of the 2009 World Series-winning club and is looked at as one of the clubhouse's main leaders -- was hearing boos occasionally at home and fans were calling for highly regarded left fielder Clint Frazier, 23, to take his job.

Frazier has hit .325 with five homers, nine RBI and a .975 OPS in 29 games at Triple-A Scranton/Wilkes-Barre.

Gardner is in the final guaranteed year of his contract, making $11 million this season. He has a $12.5-million team option and a $2 million buyout for 2019.

"Obviously he means so much to our team, the heartbeat, what he brings every day," manager Aaron Boone said. "Game-plan-wise today, he was really on it and came up today in a big spot there and snuck one out of there. Just really quality at-bats all the time and for the better part of a month now, the results have followed those quality at-bats. He's a savage up there at the top."

Brendan Kuty may be reached at bkuty@njadvancemedia.com. Follow him on Twitter @BrendanKutyNJ. Find NJ.com Yankees on Facebook.