Andriy Yarmolenko fired a dramatic last gasp winner to give West Ham a win that could have huge ramifications at the top and bottom of the Premier League.
With the game meandering towards a draw that would have done little for either side, Yarmolenko took advantage of some slack Chelsea defender to fire a low shot past Kepa Arrizabalaga to move West Ham three points clear of the relegation zone.
It was a huge moment for the Hammers and equally significant for Chelsea, as Frank Lampard's men blew their chance to move into third place after Leicester City had slipped up once again earlier in the evening.
The late drama ensured West Ham gripes from the first half were forgotten at the final whistle after the Hammers' manager David Moyes was left fuming on the touchline as Tomas Soucek's 37th minute strike was ruled out after an elongated review of the evidence.
Michail Antonio was ruled to be blocking the vision of Chelsea goalkeeper Kepa Arrizabalaga left room for plenty of debate.
West Ham's frustration was multiplied moments later as Christian Pulisic tripped over Issa Diop's trailing leg in the box, leaving referee Martin Atkinson with little option other than to point to the penalty spot to allow Willian to open the scoring.
After seeing relegation rivals Norwich and Bournemouth go down to big defeats in yesterday's early evening kick-offs, West Ham's eagerness to get something from this game made their anguish over the VAR decision all the more acute, yet their worries were eased by Soucek's headed equaliser on the stroke of half-time.
When Antonio fired West Ham into a lead six minutes into the second half, West Ham's relegation woes looked set to be given a huge lift and yet their inability to close the door at the back ensured their local London rivals knew their moment would come.
After Declan Rice gave away a foul on the edge of his own box with 72 minutes on the clock, Willian took advantage of some dubious positioning from West Ham goalkeeper Lukasz Fabianski to curl home an equaliser via the inside of the post.
That all came before Yarmolenko's late clincher which could just save West Ham's season.