After City bossed the opening half an hour - scoring twice, through Raheem Sterling and Gabriel Jesus - they came under siege from the Serie A leaders.
Ederson saved one penalty from Dries Mertens and saw Amadou Diawara dispatch another, but City were able to see out the three points.
Guardiola believes that such a win was only possible because his team delivered a flawless display at the Etihad Stadium.
"It was an amazing game," he told BT Sport. "Both teams had the same idea, high pressing, a lot of passes, attack after that.
"[Napoli] are one of the best teams I've faced in my career. No doubt about that. Maybe the best.
"It was perfect. If we did not play good, we could not beat that team. It would be impossible. If we were not aggressive without the ball, if we were not clear without the ball, no chance.
"It is a team [against which] you cannot have the ball for 90 minutes. We wanted the ball, but they have the quality. It was so demanding.
"To have nine points after three games is so important for us to qualify. The group is so tough. Shakhtar Donetsk play so good - we saw it here and they are a really good team too."
City now need just a point at the San Paolo in a fortnight to progress, but Guardiola insists they will again go for the win.
He added: "The situation is that we go to the next one and try to win the next game at Napoli. We are close, but it's not done. We cannot relax."