The 29-year-old Argentine beat the old mark of 177 set by Eric Brook during the 1930s when he netted City’s third goal in Naples after 69 minutes.
“What he has achieved has made him a legend, he’s gone down in history, so I would tell him to enjoy,” said Guardiola.
The Premier League leaders had needed just a point to seal their berth in the knockout rounds for the fifth consecutive year, with two games to go.
But City’s fourth victory out of four in Group F confirmed their progress with 12 points.
Napoli are third, six points behind Ukrainian side Shakhtar Donetsk who beat Dutch side Feyenoord 3-1, and are close to elimination from the elite European competition.
City fought back despite a dominant early display from the Serie A leaders in their San Paolo Stadium stronghold before defender Faouzi Ghoulam went off with a knee injury.
“I’m really happy we’re in the last 16. It was a great victory tonight,” said Guardiola.
“They completely destroyed us in the first 20 minutes especially Ghoulam and I wish him well. We suffered a lot but our players showed personality.
“The point is how in the bad moments the team react and they did really well. The level of football for a spectator was just amazing all I could say was ‘wow.”
Lorenzo Insigne had opened for Napoli after 21 minutes with defender Nicolas Otamendi pulling City level on 35 minutes.
City’s John Stones edged the visitors ahead three minutes after the break. But to the delight of the home crowd Jorginho converted a penalty to make it 2-2 after 62 minutes.
– ‘Record man’ –
Aguero then fired in the third seven minutes later after Leroy Sane broke up the pitch. The ball eventually fell to the Argentine who scored his record-breaking goal before Raheem Sterling put the icing on the cake in injury time.
Guardiola made two changes from last weekend’s Premier League 3-2 win at West Brom with starts for Ilkay Gundogan and Danilo.
Dries Mertens, Jorginho, Allan and Marek Hamsik started for Napoli as they looked to avenge their 2-1 loss in Manchester two weeks ago.
Napoli started brightly with captain Hamsik and Mertens both having early shots on goal but Ederson cleared.
But Insigne sent the crowd wild when he picked up a brilliant Mertens cross to fire past Ederson.
“The result is unfair considering the performance we put in,” said Insigne. “There are some regrets, as we put the best team in Europe under pressure for a good long while.”
Maurizio Sarri’s Napoli suffered a blow when Ghoulam hobbled off with a knee injury midway through the first half with Christian Maggio coming on.
The hosts were clearly shaken by the Algerian defender’s departure, Arguero went close for City with a deflected shot but defender Otamendi quickly headed in the equaliser after 34 minutes.
“Ghoulam’s departure hurt us,” said Sarri. “But we showed we are getting closer to these top teams.”
Stones powered in his header after 48 minutes for a 2-1 lead but Jorginho levelled from the spot just after the hour from the penalty spot when Sane upended Raul Albiol.
After Aguero’s headline-grabbing strike, Sterling got the fourth in the dying minutes following a Kevin De Bruyne cross as Napoli suffered their first loss at home to a Premier League team.
Download our app and read this and other great stories on the move. Available for Android and iOS.