Declan Rice scored the only goal that widened the gap between Arsenal and Chelsea, who won their game against Newcastle late on Saturday to six points.
Rice beat Bernd Leno with a first-time shot after a good lay-off by Samir Nasri, who was making his first top-flight appearance in England since August 2016.
The maiden top-flight goal comes two weeks after Rice signed a new contract that will keep him with the Hammers until 2024.
Before that, the international future of Rice, who can play at centre-back or in centre midfield, had been in the headlines.
He has earned three caps for the Republic of Ireland, all in friendlies, and the London-born man could yet decide to declare for England.
In a highly-competitive London derby, Alexandre Lacazette was denied by an excellent save from Lukasz Fabianski as Arsenal failed to score in the league for the first time since the opening day of the season.
West Ham were full value for their win, with Marko Arnautovic, Rice, Nasri and Felipe Anderson all going close when the game was goalless.