The Mets trailed 7-4 after six innings before Eric Young, Jr. stroked a two- run homer in the seventh off Alfredo Aceves to get the visitors within one.
Lucas Duda laced an RBI single off Matt Thornton (0-1) in the eighth to tie the game, and after Preston Claiborne replaced Thornton on the mound, Chris Young clubbed Claiborne's second pitch into the seats in left for a 9-7 lead.
After striking out Alfonso Soriano to end the seventh, Jenrry Mejia (4-0), who was sent from the starting rotation to the bullpen earlier Monday, worked around a pair of singles in the eighth to maintain the Mets' margin.
However, Farnsworth was able to secure his third save of the season by getting Brian McCann to ground into a game-ending 3-5-3 double play.
Curtis Granderson returned to Yankee Stadium for the first time since signing with the Mets in the offseason and slugged a two-run homer, while Eric Young, Jr. finished 3-for-5 with two runs scored in the Mets' fifth straight win over their cross-town rivals.
Brett Gardner hit his second career grand slam in the setback, while Yangervis Solarte collected three hits, an RBI and two runs scored for the Yankees, who have lost three straight overall.
Jeter registered his first three-hit game since Sept. 30, 2012 in the loss.