David Silva eased an increasingly tense atmosphere at the Etihad Stadium when he broke the deadlock.
European champions Real Madrid will play Schalke 04 in the next round.
The 36-year-old is due to return to America for pre-season training in January.
City's escape into the last 16 seemed unthinkable when they played their penultimate group game two weeks ago.
Champions Manchester City took full advantage of Chelsea's surprise reverse to cut the gap at the top.
Chelsea maintained their position at the top while Man City are 6 points behind in second place.