Carlos Beltran hit a three-run homer off Chris Sale in the third to give starter Michael Pineda all the support he would need.
The Yankees moved within three games of idle AL East leader Toronto. They also reduced their magic number for clinching a wild card spot to six games.
Pineda (12-8, 3.99) allowed one run in six innings in his longest stint since returning from the disabled list Aug. 26. He allowed eight hits, including a homer by Trayce Thompson in the sixth, and struck out six with no walks. He threw 89 pitches, 70 for strikes.
Beltran's homer scored Alex Rodriguez, who scored his 2,000th career run to join Hank Aaron as the only MLB players with 3,000 hits, 2,000 RBI and 2,000 runs. A-Rod reached on a walk after Sale hit Jacoby Ellsbury with a pitch to open the inning.
The Yankees bullpen continued to struggle. With two out in the seventh, Justin Wilson gave up a walk and a hit, and Dillan Betances allowed consecutive walks to force home a run.
But Betances benefited from a double play in the eighth, and Andrew Miller earned his 35th save despite allowing a single in the ninth.
The Yankees host the White Sox Friday at 7:05 p.m. CC Sabathia (5-9, 4.80) faces Carlos Rodon (8-6, 3.78).