Callum Hudson-Odoi scored a consolation goal for Chelsea in the 92nd minute.
Much talk before the game went to City's squad issues with six players unavailable due to positive COVID-19 tests. Pep Guardiola gave USMNT goalkeeper Zack Steffen his first Premier League start and was one substitute short due to the staffing issues.
It wasn't the ideal start to Steffen's Premier League career when he picked up a backpass from Rodri after just four minutes. However, Chelsea's resulting free kick -- which was bizarrely taken from outside the box -- was deflected away.
Chelsea then quickly found themselves 2-0 down as both Gundogan and Foden fired goals past Edouard Mendy.
Starting on the left wing, Oleksandr Zinchenko fed the ball to Foden on the edge of the box who poked the ball on to Gundogan. The midfielder let the ball slide through his legs as he turned and launched it into the net.
Three minutes later Foden was rewarded for his earlier assist with a goal of his own as De Bruyne fed a ball in, again from the left, for the England international who was waiting at the near post.
City's third came from De Bruyne on 34 minutes after Raheem Sterling made a galloping run through the Chelsea half. Chased by N'Golo Kante, Sterling was the first City player to arrive in the box and with no support he saw his tight shot from the left rebound off the crossbar.
By that stage, however, the City cavalry had arrived and De Bruyne picked up the loose ball and struck it into the net.
Hudson-Odoi grabbed Chelsea's only goal at the death after Zinchenko sent him off on a run and he hit the ball past Steffen from close range.
"For 10 minutes we were good, then they started to play and we concede two poor goals back to back in the game," Frank Lampard said after the game. "It knocked us and we didn't react well.
"At the minute we're in a little period, five or six games that we've struggled. If you go back to City and Liverpool in their transition periods there were periods of pain and you have to get through that.
"I'll be the first to look at myself today but I know where we're at and I know what it takes to churn out the level that City were at today. It's normal that we take knocks but now is a test."
The result means Chelsea have taken just four points from their last six games and City move three points ahead of them to fifth with two games in hand.
"Same manager, same backroom staff, the players are the same and the ideas are completely the same," Guardiola said after the game.
"The way we won leagues and titles and other things is the way we played today. The tempo we have missed in the past, today we recovered it."