Carlos Tevez twice put Juventus into the lead at the Jassim Bin Hamad Stadium, but Gonzalo Higuain was on hand to also net twice – his second coming after 118 minutes.
Even then the defending Serie A champions had chances to win the Supercoppa Italiana for a seventh time, but three Juve players missed spot-kicks in sudden death to give Napoli the title, much to the frustration of head coach Allegri.
"Both teams played open football, unfortunately we conceded two minutes from the end," he told Rai Sport.
"Then we had three match balls in the shootout and got them all wrong.
"The lads put in a good performance, so it's a shame. We had this cup two minutes from the end, but [we] are still top of the Serie A table and through to the Champions League knockouts."
Giorgio Chiellini was first to miss from the spot in sudden death with a weak kick and then Roberto Pereyra blasted another over the crossbar after Jose Callejon had missed for Napoli.
Kalidou Koulibaly then netted for Napoli, leaving Simone Padoin needing to score, but his effort was palmed away by Rafael at full stretch, handed Rafael Benitez's side victory.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.