It was the Hammers' first league win under manager Manuel Pellegrini, whose four previous top-flight games in charge of the east London club at the start of this season had all ended in defeat.
This victory at Goodison Park also catapulted West Ham out of the bottom three.
Chilean boss Pellegrini, celebrating his 65th birthday on Sunday, had spent ?100 million ($129 million) bringing nine new signings to the London Stadium in the close season.
But such had been the Hammers' poor start to the new campaign that questions were already being asked about the former Manchester City manager's long-term job prospects.
'This is the way'
"It's easy to say we were going to change, but I was absolutely convinced this is the way," Pellegrini, who said his birthday was the "last thing" on his mind, told Sky Sports.
"We score goals and always try to continue scoring goals. I saw the players working every day of the week...I am convinced and the players are convinced."
Ukrainian forward Yarmolenko, one of Pellegrini's new signings, gave his manager some breathing space on Merseyside with a double strike that put the visitors 2-0 up just after the half-hour mark.
Gylfi Sigurdsson pulled a goal back in first-half stoppage time before Marko Arnautovic restored West Ham's two-goal lead in the 61st minute as Everton suffered their first defeat under manager Marco Silva.
"We didn't play with enough quality to win the match," Silva told the BBC. "It's a tough result for us."
It took West Ham just 11 minutes to break the deadlock when one long ball out of defence proved too much for Everton to handle.
Arnautovic unselfishly squared the ball to Yarmolenko, who fired home from close range.
And the away fans had a second goal to celebrate when Yarmolenko doubled the Hammers' lead in the 31st minute.
Everton goalkeeper Jordan Pickford's poor pass gifted West Ham possession in a dangerous area and Yarmolenko, cutting in off the right flank, beat two defenders before curling a left-footed shot into the top corner from the edge of the box.
But just when it seemed West Ham would enjoy a 2-0 lead at the break, Everton gave themselves a lifeline when Sigurdsson headed powerfully home from an excellent cross by full-back Jonjoe Kenny.
Everton squandered several chances to equalise and were made to pay when Pedro Obiang drove into their box and slipped the ball sideways to Arnautovic, who toe-poked a shot past the diving Pickford.