Trailing 3-1 heading into the seventh, the Yanks sent 13 men to the plate, pounding out six hits and benefiting from a pair walks and a hit batsman to win the inter-league contest going away.
Derek Jeter, Brett Gardner and Chris Dickerson each contributed two hits and a pair of RBI and Curtis Granderson socked a solo homer, his 16th, for the Yankees, who took the rubber match of their three-game crosstown series with the Mets.
Luis Ayala (1-0) was credited with the win after tossing 1 1/3 innings in relief of starter Ivan Nova, who surrendered 11 hits and three runs over 6 2/3 frames.
Mike Pelfrey (3-4) was touched for five runs on eight hits in a six-inning start for the Mets.
Willie Harris went 3-for-4 with an RBI in the Mets' loss.