Piotr Zielinski scored twice in 14 second-half minutes before substitute Dries Mertens capped off the comeback to consign the Rossoneri to a deflating defeat in their first outing of the new Serie A season.
Gennaro Gattuso had appeared set to record a memorable victory over Ancelotti - under whom he won the Champions League twice as a player - when David Calabria doubled a lead earlier opened by Giacomo Bonaventura.
But the influential Zielinski soon took command of the contest with two fine finishes and the hosts' dominance was rewarded through Mertens' 80th-minute winner, continuing Napoli's unbeaten run in this fixture to eight Serie A meetings.
Milan started in far brighter fashion as Bonaventura brilliantly rifled beyond debutant David Ospina with the outside of his right boot in the 15th minute.
Napoli regularly tried their luck as the half wore on but the margin only widened soon after the interval, right-back Calabria clinically stroking Suso's pass into the bottom far corner.
Concession of a second shocked the hosts back into life and they were level fewer than 20 minutes later courtesy of an inspired Zielinski.
The Poland midfielder initially halved the deficit with an unerring left-footed finish from the edge of the area and his second was even better, catching out Gianluigi Donnarumma with a first-time volley from Tiemoue Bakayoko's clearing header.
And there was further punishment still to come for Milan as Mertens buried Allan's clever low cross to give Ancelotti maximum points from his first two matches at the helm, in the process leaving Gattuso with plenty of questions.
What it means: Lessons still to learn for Milan
Milan under Gattuso were clearly a work in progress last season and they evidently still have some maturing to do. Their two-goal buffer should have been enough for three points, but an inability to take the sting out of the contest came back to bite them.
Pat on the back: Zielinski the saviour
With Mertens left on the bench until after the hour, Zielinski took it upon himself to spearhead the Partenopei's recovery. His two goals were both expertly taken and came as deserved reward for a performance in which he persistently threatened.
Boot up the backside: Biglia in the bad books
Coughing up a two-goal cushion was the outcome of Milan's failure to exert control in midfield. Lucas Biglia was far from the only culprit but, tasked with screening the defence, he was unable to provide protection and was hooked in the 58th minute.
Key Opta facts
- Napoli won a Serie A game from two goals down for the first time since April 2011 (vs Lazio).
- Milan scored their second goal at the end of a sequence of 27 passes.
- Mertens scored his first Serie A goal vs Milan at the 12th time of asking.
- AC Milan scored with their first shot on target of the season.
- Zielinski scored his first Serie A brace in his 156th appearance.