The Dodgers came from 5-0 down in game five at Yankee Stadium as the hosts made a string of defensive errors.
They were not ahead on the night until the eighth inning and starting pitcher Walker Buehler, pitching in relief for the first time in six years, clinched the victory with three quick outs in the final inning.
Having lost the first three games of the series, the Yankees kept their slim hopes alive with a win in game four on Tuesday night.
They looked to be carrying that momentum into Wednesday as they took a 3-0 lead in the first inning as Aaron Judge and Bahamas-born British international Jazz Chisholm Jr hit back-to-back home runs.
Alex Verdugo added another run before Giancarlo also went deep in the third inning to make it 5-0.
But defensive errors by Judge, who dropped a straightforward catch in the outfield, short stop Anthony Volpe and pitcher Gerrit Cole handed the Dodgers five unearned runs in the fifth inning.
Stanton’s sacrifice fly in the sixth inning edged the Yankees back in front, but the Dodgers loaded the bases – helped by another error by catcher Austin Wells – in the eighth inning, allowing Gavin Lux and Mookie Betts to drive in two more runs.
The Yankees briefly threatened to rally in the eighth inning, but were unable to draw level before Buehler put the seal on the Dodgers success.
Freddie Freeman, who set a World Series record with home runs in the first four games, was named MVP.