Manchester City midfield pair Ilkay Gundogan and Fernandino were on target as Pep Guardiola’s Premier League superiority over West Ham continued.
City has now won 10 out of 11 top-flight meetings with the Hammers under the Spaniard.
In a game played in a snowstorm before half-time, skipper Gundogan provided the decisive moment after 33 minutes when he turned home a deflected Riyad Mahrez effort at the far post.
It was the Germany midfielder’s third goal of the season – and his second in four league games – and was followed up in the final minute by Fernandinho, who had only been introduced three minutes earlier to tie the game up.
The veteran Brazilian had not scored a Premier League goal since October 2018 but found the target from the edge of the box.
Manuel Lanzini pulled one back with the final kick of the game, which cost Ederson his 100th clean sheet in all competitions but did nothing to prevent City from moving back into the second spot, six points clear of the Hammers.
The Londoners remain fourth despite suffering successive Premier League defeats for the first time since April.