West Ham squandered enough chances to go ahead against Arsenal and they were undone by a late sucker-punch from Alexandre Lacazette.
The first half had no goals, but it wasn't short of action.
The visitors started the game well, pressing the Gunners and hitting in the counters. The best chance of the half came in the fell to Michail Antoni and Sebastien Haller, but the two could not string their passes well and they failed to score in a two versus one against Bernd Leno.
Pablo Mari made a few good tackles to keep the scores level at zero and it was a good Premier League debut for the defender.
Arsenal had their best chance fall to Sokratis whose header hit the top of the bar.
The two sides came back for the second half with no changes to the lineups and no change on the scoreline until the 80th minute.
There were Arsenal screams for a penalty in the 67th minute after a tussle off the box between Issa Diop had Lacazette who had come on for Eddie Nketiah, but after a VAR check, the game continued.
The VAR was called into action again after a 77th minute Lacazette goal that was initially ruled out for offside.
Mesut Ozil appeared to have gone too soon when he raced onto Aubameyang's blocked shot and the German then nodded the ball to Lacazette who tucked it in.
Amid all that drama that took up to four minutes, West Ham sent on Soucek on for Mark Noble, but the Hammers only had to blame themselves for this result, despite another late chase.
This is a third win in a row in the Premier League for Arsenal, and they clearly have their sight set on a top-four finish.
This is a tough blow for David Moyes’ battling West Ham, who had hit the woodwork in the opening moments through Jarrod Bowen and seen Michail Antonio spurn a glorious close-range chance before forcing a superb stop from Bernd Leno in the second half.
The Gunners are now just five points off 4th placed Chelsea, as West Ham stay out of relegation zone, but just on goal difference.