Gomes delivered a three-run homer and rookie Xander Bogaerts had two hits and three RBI, including his first major-league round-tripper, as the Red Sox handed the Yankees a third straight loss.
John Lackey (9-12) earned the decision despite yielding eight hits and seven runs over 5 2/3 innings.
The American League East-leading Red Sox extended their lead over fourth-place New York to 11 games with their fifth consecutive win overall.
David Huff (2-1) was lit up for eight hits and nine runs over 3 1/3 innings for New York, which fell three games out of an AL wild-card spot.
Benedict Cumberbatch's dramatic reading of R. Kelly lyrics is just what you need
Exploding whale video goes viral on Internet