Cristiano Ronaldo scored his fourth goal in three matches since his return to Manchester United on Sunday before Jesse Lingard grabbed a late winner on his return to West Ham in a 2-1 win.
Ronaldo tapped in to cancel out Said Benrahma's opener and substitute Lingard appeared to have won the match for the visitors in the 89th minute.
But there was time for late, late drama when the home side were awarded a penalty for a Luke Shaw handball in added time.
Mark Noble came on to take the spot kick but United goalkeeper David de Gea dived to his left to keep it out, sparking a frenzy among United players.
United move into second place in the table, level on points with Liverpool.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.