The win lifts City back up to second place and level on 29 points with leaders Chelsea, who host Manchester United in the late game. West Ham, who snatched an added-time consolation with a superb Manuel Lanzini strike, stay fourth on 23 points.
“It was a very difficult day because of the weather conditions but it is always difficult against this team,” City midfielder Rodri told the BBC.
“We were lucky to get this first goal because in the first half we couldn’t play much. In the second we dominated and could have scored more.”
With thick snow falling for most of the opening half, City’s Riyadh Mahrez had the ball in the net in the 16th minute after a superb finish but his effort was ruled out for offside.
City took the lead in the 33rd minute when Mahrez drove the ball across the goal and Gundogan was on hand to steer it home.
That marked the beginning of a spell of heavy pressure from the hosts and they could have gone 2-0 up four minutes later but Gabriel Jesus’s shot was cleared off the line by Ben Johnson.
Halftime saw the snowstorm abate and an army of groundstaff cleared the pitch. West Ham then had another let-off when Aaron Cresswell made a goal-line clearance as City dominated.
It took the home side until the 90th minute to score again, however, as Jesus teed up fellow Brazilian Fernandinho to net three minutes after he came off the bench.
Having seen little to warm them up during the game, the West Ham fans finally had something to celebrate when Lanzini won the ball on the edge of the area and sent an unstoppable shot into the top right corner with the final kick of the game.
City coach Pep Guardiola paid tribute to the groundstaff at the stadium before praising the performance of his players, who had a tough Champions League game against visiting Paris Saint Germain which they won 2-1 in midweek.
“Surprised with the amount of chances we created against them. We created a few. The first half was almost impossible to play. The game against PSG was so demanding and the team gave a good performance,” he told the BBC.
“The chances we created … it could have been three or four,” he added.