Eddie Nketiah’s late goal ensured Arsenal maintained their 100% Premier League start as they condemned West Ham to a second successive defeat.
The Gunners largely controlled the early stages and went ahead with their first effort on goal when Alexandre Lacazette headed in from Pierre-Emerick Aubameyang’s chipped cross.
Despite Mikel Arteta’s team largely dominating possession West Ham slowly grew into the game.
The Hammers, who always looked dangerous on the counter-attack, levelled just before the interval when Michail Antonio bundled in Ryan Fredericks’ cross at the end of a sweeping move.
While Arsenal continued to enjoy more of the ball after the break, David Moyes’ side created the better openings in front of goal with Antonio heading against the bar and seeing a scuffed close-range effort saved by Bernd Leno.
However, Nketiah’s late tap-in from a Dani Ceballos pass gave Arsenal all three points.