Slaven Bilic's side were hoping to make it four consecutive victories following a superb run of form in recent weeks but they failed to make their early pressure count and were made to suffer as Lukaku kept up his formidable record against the Hammers.
The Belgian striker has been a nemesis for West Ham in recent seasons and it proved to be the case once again when he opened the scoring on 50 minutes.
Lukaku made it nine goals from just 11 games – scoring in the last seven consecutive games against West Ham.
Barkley wrapped up the victory for the home side with a volley late in the game and it was hard luck on the Hammers players who had worked so hard to record back-to-back home wins over Sunderland and Chelsea in the last week.
Bilic will of course be looking for an immediate response when the Hammers return to London Stadium next weekend and face Stoke City.
Following the memorable EFL Cup win over Chelsea in midweek, Slaven Bilic opted to make just one change to the starting line-up with Adrian returning to the Hammers goal in place of Darren Randolph.
That meant Michail Antonio was chosen as the man to play through the middle once again why goal hero Edimilson Fernandes retained his place in the starting line-up.
You could see the confidence among the Hammers players following the recent victories and they dominated the opening exchanges at Goodison Park.
After the Everton fans paid a special tribute to former manager Howard Kendall, it was Antonio who could have broken the deadlock after just five minutes.
Dimitri Payet's cross fell perfectly for the England forward inside the box but his close-range effort flew just over the bar.
Payet was involved in the heart of the action once again on 12 minutes when he played the perfect through ball for Pedro Obiang who only had Joel Robles to beat in the Everton goal but he fired his shot just over the bar.
It was all one way traffic at his point and Payet came even closer to getting on the scoresheet just sixty seconds later when his shot produced another fine save from Robles diving low to his left.
The Hammers could have been made to pay for those missed opportunities when Romelu Lukaku broke clear of the West Ham defence on 16 minutes and burst towards goal.
Yannick Bolasie saw his shot well blocked by Mark Noble. The rebound fell to Gareth Barry who curled a shot inches over the bar.
The Hammers continued to create the best openings and had another golden chance on 22 minutes when Manuel Lanzini superbly turned Ramiro Funes Mori and played the ball across goal but there was no Hammers player to turn the ball home.
Everton still looked dangerous on the counter attack and Adrian had to be at his very best to stop Ross Barkley opening the scoring on 26 minutes.
Bryan Oviedo burst clear past Fernandes and crossed in for the England midfielder who looked destined to score but his shot produced a world class one handed save from Adrian.
Adrian was then called upon once again on 37 minutes when he tipped over a cross shot from Mirallas.
Everton made the Hammers pay as they opened the scoring early in the second half.
Seamus Coleman's low shot was well kept out Adrian. Yannick Bolasie beat Winston Reid to the ball with a sliding cross and Lukaku had the easy task of heading home from close-range for his 50th Everton goal.
The Hammers refused to lie down and could have drawn level on 65 minutes when Antonio used his pace to beat Ashley Williams down the left hand side and burst clear into the box but he saw his low shot kept out by the legs of Robles.
Antonio then turned provider on 68 minutes as his pass picked out substitute Andre Ayew but his shot was deflected inches past the post.
Everton put the game beyond West Ham when Barkley added a second on 76 minutes.
Lukaku's cross picked out the Everton midfielder and he made no mistake volleying the ball into the back of the net.
Everton: Joel; Coleman, Funes Mori, Williams, Oviedo; Gueye, Barry, Barkley (Lennon 88); Bolasie (Jagielka 82), Lukaku, Mirallas (Cleverley 71)
Subs not used: Hewelt, Deulofeu, Calvert-Lewin, Holgate
Bookings: Gueye, Oviedo
West Ham: Adrian; Kouyate, Reid, Ogbonna; Fernandes (Zaza 70), Obiang (Ayew 60), Noble, Cresswell, Lanzini (Feghouli 77), Payet, Antonio
Subs not used: Randolph, Nordtveit, Collins, Fletcher
Bookings: Obiang, Reid, Antonio
Referee: Anthony Taylor