The Sky Bet Championship visitors, who had won just twice in their last 16 matches, sensed an upset after Fernando Forestieri and Troy Deeney gave them a half-time lead.
City manager Manuel Pellegrini's substitutions at the break saw defenders Vincent Kompany and Pablo Zabaleta sent on with forward Stefan Jovetic added in the 57th minute.
Within two minutes City pulled one back when Aguero converted Aleksandar Kolarov's cross and after the Argentina international doubled his tally Kolarov added a third three minutes from the end.
That still left enough time for Aguero to complete his hat-trick.
Goals in either half from Victor Moses and Daniel Sturridge were enough to see Liverpool overcome Bournemouth 2-0.
The visitors named a strong side for the game at the Goldsands Stadium and it was Luis Suarez who created both goals to see the Reds into the last 16.
Cup holders Wigan beat top-flight opposition Crystal Palace 2-1 in a minor upset at the DW Stadium.
The Latics were relegated from the Premier League after their historic cup win in May and only 14 places separated them from the visitors, who were a Championship side last season.
Cup final hero Ben Watson put Wigan ahead in the 36th minute and although Aaron Wilbraham equalised midway through the second half, James McClean quickly struck the winner.
Fellow Championship side Birmingham threatened a surprise when Lee Novak gave them a 15th-minute lead at home to Premier League Swansea but two goals from Wilfried Bony in three second-half minutes turned things around and secured a 2-1 win.
Everton cruised into the fifth round, but their 4-0 victory against Stevenage was overshadowed by an injury to Bryan Oviedo, who was taken to hospital with a suspected broken leg.
Oviedo's left leg was injured after he was caught by Stevenage midfielder Simon Heslop as he was attempting a shot on goal.
Everton's players turned away in horror as the midfielder lay stricken on the floor at the Lamex Stadium. The Costa Rican was taken to hospital and now looks set for a lengthy spell on the sidelines.
Everton, who were 1-0 up at the time thanks to Steven Naismith's goal, did not let the incident affect them as they strolled to a comfortable win.
Naismith found the net again before substitutes Johnny Heitinga and Magaye Gueye finished the rout against the Sky Bet League 1 side.
Non-league Kidderminster put up a brave fight at Capital One Cup finalists Sunderland but went down 1-0 to a fifth-minute goal from 19-year-old Charis Mavrias, his first for the club since joining in the summer.
Premier League sides Hull, Southampton and Cardiff all made it safely through.
Matty Fryatt scored both goals as the Tigers beat League 2 Southend 2-0, Guly Do Prado and Sam Gallagher scored in the Saints' 2-0 win at home to Yeovil while Frazier Campbell's solitary strike was enough for the Bluebirds to defeat Championship side Bolton 1-0 at the Reebok Stadium.
In the all-Championship clash, Simon Church scored early in the second half as Charlton won 1-0 at Huddersfield.
Brighton won 3-1 at Port Vale as Rohan Ince and Solly March scored either side of Chris Robertson's equaliser before Jonathan Obika wrapped up victory.