Hosts City, who won the competition last season, looked to be heading for a heavy defeat when they found themselves 3-0 down and a man down at the break.
However, the ten-men produced a spirit second-half display to almost force a replay.
City started the the as the brighter of the two teams, but they were unable to force Anders Lindegaard into any telling action.
The game's first goal went the way of the visitors, albeit slightly against the run of play. Wayne Rooney found Antonio Valencia on the right, who in turn repaid the favour for Rooney to head past City's stand-in goalkeeper Costel Pantilimon with ten minutes played.
United took full advantage of their numerical superiority, as Danny Welbeck volleyed past Pantilimon with half-hour on the clock.
Two became three in the 40th minute when Aleksandar Kolarov brought down Welbeck inside the box. Pantilimon denied Rooney's effort, but the England international headed in the rebound.
City's response after the break was positive and in the 48th minute Kolarov atoned for his earlier error when he curled a free-kick beyond the reach of Lindegaard.
The Danish goalkeeper was then at fault as Sergio Aguero got City back into the tie when he capitalised on a spill by Lindegaard to score into an empty net with 25 minutes remaining.
Kolorav had a chance to score another free-kick in injury time, but his effort was palmed away by Lindegaard as United held on to advance through to round four.