The match remained in the balance until Fernandinho doubled the lead late on, but there was still time for Manuel Lanzini to net a stunning consolation strike with the last kick of the game.
West Ham started brightly, and had Said Benrahma not got the ball stuck under his feet when inside the box, they may have taken an early lead.
But City took control, with Aymeric Laporte heading just wide from a corner, before Riyad Mahrez had a goal ruled out for offside after 17 minutes.
The hosts did take the lead though, and it came with 33 minutes on the clock as the snow fell heavily at the Etihad.
Mahrez had space on the right, and his ball into the box deflected into the path of Gundogan, who had a simple finish from just a few yards out.
Gabriel Jesus very nearly doubled the lead shortly after as he fires past Lukasz Fabianski, but Ben Johnson got back brilliantly to keep it out on the line.
It was tight between the two sides after the break. Aaron Cresswell was forced off on the hour mark, as he hooked Jesus’ effort off the line but injured himself colliding with the post.
West Ham try to pile on the pressure late on in search of an equaliser, as they moved to a back four, but struggled to create a big chance.
Gundogan had an effort well saved as City enjoyed the extra space on offer, before Fernandinho sealed the win late on after coming off the bench after Jesus set him up.
Lanzini struck from outside the box with a sensational finish, but the result was already sealed, as City went level on points with Chelsea ahead of Thomas Tuchel’s side facing Man United later in the afternoon.