The hosts produced a smash-and-grab performance in the first half to go into the break ahead courtesy of N'Golo Kante's late opener, but they were a match for the champions after the interval and doubled their advantage through David Luiz in the 78th minute.
City could not find a way back as their 21-match unbeaten streak came to an end, leaving them a point behind new Premier League leaders Liverpool, who are now the only remaining unbeaten team in the top flight this season.
Chelsea, meanwhile, move back into the top four having extended their unbeaten start at home under Maurizio Sarri.
Both sides had slipped down the table courtesy of results earlier in the day, with Liverpool beating Bournemouth to knock City off top spot and Chelsea dropping out of the Champions League places after Arsenal beat Huddersfield Town.
Interestingly, both teams also started without a recognised number nine as Eden Hazard led the line for Chelsea and Raheem Sterling for City, so it was perhaps unsurprising that there was a lack of cutting edge for most of the first half.
Pep Guardiola's side still dominated the opening 45 minutes, though, and looked a class above Chelsea for the most part despite ultimately going into the break behind.
There were a couple of chances for City to open the scoring before that, and the first fell to Sterling when he failed to get enough on his finish to truly test Kepa Arrizabalaga in the Chelsea goal.
The tame effort proved to be the only shot of any note in the first half-hour, but Leroy Sane threatened to break the deadlock twice in quick succession after that as he first saw an effort from a tight angle saved by Kepa before being thwarted by a fine last-ditch block from Cesar Azpilicueta moments later.
Chelsea had not registered a shot as the clock ticked into the last minute of the first half, but the hitherto isolated Hazard produced just his side's sixth completed pass in the final third to pick out Kante, who slammed his finish into the roof of the net past a helpless Ederson.
The opener came completely against the run of play and suddenly City had to deal with being behind for the first time since August, and going into half time in a losing position for the first time in more than a year.
It was Chelsea that made the brighter start to the second half, though, and Ederson was forced into his first save of the match just four minutes after the restart when he parried Willian's free kick away.
Willian then collected a pass from Kante before looking to pick out the bottom far corner, but he did not catch his effort as desired and Ederson was left with a fairly routine save.
It was a much more even contest in the second half, and Kepa was forced into a couple of comfortable saves himself to deny Kyle Walker's free kick and then Sterling's shot from range.
City were struggling to create any clear chances, though, and Pedro drew another save from Ederson shortly after the hour mark.
The crucial second goal came with 12 minutes remaining as Chelsea put the game beyond the champions when Luiz met Hazard's corner with a fine header which looped into the far corner via the underside of the crossbar.
City had no response to the second goal, and Chelsea could have added a third with just four minutes remaining when Ross Barkley planted an unmarked header well wide from inside the area.
The champions' pressure came too late to strike real fear into the Chelsea defence, with Fernandinho lashing a sweetly-struck volley wide on 90 minutes and Kepa then making up for his own mistake by turning Bernardo Silva's shot past the post in stoppage time.
The final whistle was greeted with raucous celebrations from the home fans as Sarri's side bounced back from their midweek defeat to Wolves in the best possible fashion, while City fall to an away league defeat for the first time since January, missing out on a club-record unbeaten streak in the process.
CHELSEA (4-3-3): Kepa; Azpilicueta, Rudiger, Luiz, Alonso; Kante, Jorginho, Kovacic (Barkley 65'); Willian (Loftus-Cheek 75'), Hazard (Giroud 90'), Pedro
MAN CITY (4-3-3): Ederson; Walker, Stones, Laporte, Delph; Bernardo, Fernandinho, Silva (Gundogan 68'); Mahrez (Foden 84'), Sterling, Sane (Jesus 53')