Gleyber Torres went 2-for-4 with an RBI and run scored, and Everson Pereira crossed the plate twice to lead New York (73-72), which pushed across single runs in the fifth and sixth innings and two more in the ninth.
Carlos Rodon (3-5) struck out nine and allowed just one run on four hits through five innings to nab the win. Nick Ramirez clinched his first career save with a clean ninth.
The Red Sox (73-72) were 0-for-15 with runners in scoring position and left 12 on base.
Ceddanne Rafaela accounted for two of Boston's hits, launching a leadoff home run and a double.
The Red Sox jumped on top early as Rafaela crushed Rodon's first pitch in the bottom half of the first inning off the light standard on top of the green monster for his first career home run.
It had been a bit of an inauspicious start for Boston as starter Kutter Crawford loaded the bases with no outs, but a strikeout and double play ended a 24-pitch inning without any damage.
Crawford retired 11 straight Yankees after Jake Bauers led off the second with a single.
The Red Sox had back-to-back baserunners to begin the second and another to lead off the third, but five of Rodon's six outs over those innings were strikeouts.
Pereira's two-out walk in the fifth broke up Crawford's perfect string, and a stolen base set him up to slide across the plate on Estevan Florial's line single to center.
Boston reliever Josh Winckowski (3-2) worked out of trouble with just one run allowed in the sixth, but took the loss nonetheless. After an Austin Wells single sandwiched between two walks, Bauers' hard fielder's choice grounder to third plated New York's go-ahead run.
Both teams left two on in the seventh. First, Boston reliever Zack Weiss struck out Aaron Judge and Torres to strand a pair of inherited runners on base.
For the hosts, Rafaela (double) and Trevor Story (infield single) were stranded after reaching to begin the seventh and eighth, respectively.
The Yankees padded their lead in the ninth. In a bases-loaded, one-out situation following an intentional walk to Judge, Torres knocked an RBI base hit through the left side. Wells then reached on catcher's interference to bring in another run.
Red Sox closer Kenley Jansen exited the game with a trainer due to fatigue and illness symptoms during the ninth inning.
Crawford struck out seven across 4 2/3 innings of three-hit, one-run ball.
—Field Level Media