The Red Devils won 3-1 at Aston Villa earlier in the day, Bruno Fernandes, Mason Greenwood and Edinson Cavani securing all three points after Bertrand Traore's opener.
It was the 10th time this season United have recovered from conceding first to win, which marks a record in the Premier League.
Former United manager David Moyes then saw his West Ham side lose at home to his old club Everton courtesy of Dominic Calvert-Lewin's first-half strike.
That result means Ole Gunnar Solskjaer's side are now certain to finish in the top four in the table – and return to next season's Champions League – regardless of their results in their final four games, or the Europa League final, the prize for winning that competition being a place in UEFA's flagship tournament