Ilkay Gundogan opened the scoring from close range in the first half, but City had to wait until the final seconds to get the second goal when Fernandinho placed a shot in the bottom corner.
Even Manuel Lanzini's late wondergoal wasn't enough to get West Ham back in it, and City made sure all three points stayed in Manchester after a game in which Ederson was rarely threatened.
Here's how we rated the players...
Ederson - 6
We've seen some very good goalkeepers get absolutely bullied by West Ham's physical presence this season, but Ederson was having none of it. Claimed every cross with ease. Couldn't do much about the late goal.
Kyle Walker - 5
Uncharacteristically sloppy with his passing, a quality he's mostly cut out of his game. The conditions can't have helped, especially in the first half.
Ruben Dias - 6
Antonio clearly didn't fancy a physical battle with Ruben, as the Jamaican international switched to Laporte's side early on and stayed there.
Aymeric Laporte - 6
Picked himself up a suspension, but just about managed to keep West Ham's danger men at bay. A few wayward passes, as was the case with most of our defenders.
Joao Cancelo - 6
Continued to fill the creative void left by the absence of Kevin de Bruyne, pushing up into his favoured right wing spot whenever he could.
Rodri - 7
Ran the game yet again from his deep position and seemed unfazed by the heavy snow.
Ilkay Gundogan - 8 (Man of the Match)
A midfield masterclass from both our no. 8's today, with Gundogan scoring the all-important goal just as he did so many times last season.
Bernardo Silva - 7
Won the ball back countless times. West Ham couldn't get it off him, either. Saw a late goal ruled out correctly.
Riyad Mahrez - 7
Had two big chances to pass to Ilkay Gundogan for a goal. Took the first one and got a deserved assist, but inexplicably chose to shoot the second time round when a goal could've killed the game before the break. Also scored a fine goal that was ruled out for offside.
Gabriel Jesus - 7
His battling, physical presence was exactly what we needed in tough conditions. Very unfortunate to have two good efforts cleared off the line.
Raheem Sterling - 6
Looked lively and hungry but didn't quite get the assist despite coming close a few times. Won the ball back well for the offside Mahrez goal, then put in a great cross that Jesus couldn't quite convert and later made a chance for Gundogan.
Fernandinho - 7
Scored a rare goal - and one that proved to be crucial, too.
You can follow us for live updates here: @City_Xtra