Angelo Ogbonna's powerful header earned West Ham all three points to move them up to sixth and condemn Everton to their first home loss of the campaign.
The visitors dominated the first half and had the ball in the net through Tomas Soucek, but the Czech was correctly flagged for offside.
The second half was a more even affair, but after winning a corner following an aerial duel between Jordan Pickford and Michail Antonio, the Hammers broke the deadlock when Jarrod Bowen whipped in dangerously and Ogbonna timed his jump to perfection to send the travelling fans delirious.