England full-back Leighton Baines was the architect of the Hammers downfall with two stunning free-kicks.
Ravel Morrison struck the first for the Hammers with a deflected effort on the half hour to give them the lead at half time. Baines then hit back for the visitors with the first of his two free-kicks.
Mark Noble gave the Hammers the lead from the penalty spot on 76 minutes after Kevin Nolan was brought down in the box. He was then sent off only minutes later for a second bookable offence after bringing down Ross Barkley just outside the Hammers box. Baines stepped up for the resulting free-kick and promptly smashed the ball into the top corner to give the Toffees a share of the spoils.
The Hammers were then left shell-shocked when on-loan striker Romelu Lukaku (a summer target for Sam Allardyce) headed down and into the net to give Everton all three points.