Michail Antonio’s first-half strike for the visitors had canceled out Alexandre Lacazette’s 50th goal for the Gunners.
West Ham was more organized playing with a five-man defense than in their opening 2-0 home loss to Newcastle United as they faced an Arsenal side fresh from winning at Fulham.
But the hosts broke through in the 25th minute when captain Pierre-Emerick Aubameyang, fresh from signing a new three-year deal, sprang onto a through ball down the left.
He then chipped across to Lacazette, who headed past goalkeeper Lukasz Fabianski.
West Ham leveled just before half-time with a brilliantly worked move from deep in their own half.
Tomas Soucek ran the ball through the middle and sent a pass wide to Ryan Fredericks who whipped it into the path of Antonio to net from close range.
Antonio nearly doubled his tally with another tap-in shortly after the restart, but Arsenal’s goalkeeper Bernd Leno got down at his feet to smother the ball right on the goalline.
Instead, Nketiah claimed all three points for the hosts.
He latched onto a Dani Ceballos layoff in the 85th minute, having come on less than 10 minutes before then to replace Lacazette.