David Moyes' side came from behind to secure an impressive victory after the Hammers' striker had opened the scoring before his sending off, with Darron Gibson also dismissed
The hosts took the lead in the 13th minute after Carlton Cole took a pass in his stride before spinning his marker and burying a vicious effort into the bottom corner, but Everton equalised in the second half through a delicately glanced header by Victor Anichebe.
After Cole was sent off for a high boot after his clumsy challenge felled Leighton Baines, Everton took the lead when a superb move saw Steven Pienaar get the final touch inside the box. Darron Gibson saw red in stoppage time for a very similar foul to Cole's.
West Ham manager Sam Allardyce made just one enforced change to the team that drew with West Brom last time out, with James Tomkins replacing the ill Guy Demel at the back.
Everton boss David Moyes made three changes to his side, with Phil Neville, Anichebe and John Heitinga drafted into the starting line-up in place of Seamus Coleman, Steven Naismith and the suspended Marouane Fellaini.
The hosts started the brighter of the two sides but it was Everton that went closest first to opening the scoring. Leon Osman was adjudged to have used his elbow before nodding home a Baines corner in the 11th minute.
They were made to pay just moments later, when Cole put West Ham ahead after shrugging off the attentions of Heitinga before drilling an effort into the bottom left-hand corner past the despairing Tim Howard.
With Everton flooding forward in search of an equaliser, the hosts had goalkeeper Jussi Jaaskelainen to thank for pulling off a string of fine saves to see them in at the break a goal to the good.
David Moyes' side raced out of the traps in the second half and went close shortly after the players took to the pitch again, with Baines curling an exquisite effort just wide off the frame of the goal after Mark Noble fouled Pienaar just outside the box.
West Ham should have extended their lead just after the hour mark when Cole's decent low cross found substitute Modibo Maiga unmarked in the box, but his touch was heavy and he was only able to scuff an effort wide of the post.
The visitors equalised in the 64th minute through a glanced header from Anichebe after a concerted spell of pressure, with Pienaar's ball into the ball from the left proving too good for the West Ham defence to deal with.
Referee Anthony Taylor then made his second questionable call of the day after the earlier disallowed goal when he gave Cole a straight red card when his high boot struck Baines in the neck, when a yellow looked the correct decision.
With the man advantage, Everton sought to press home their dominance and they took the lead for the first time in the 73rd minute through Pienaar after a beautiful flowing move down the left saw Tomkins clear the ball onto the South African midfielder before it inadvertently rolled past Jaaskelainen.
Gibson was giving his marching orders in stoppage time by Taylor after a high challenge on Noble very similar to the one that saw Cole dismissed, but Everton managed to hold on to clinch an important three points.