The game looked to be heading for penalties until Alexis Sanchez struck late in the second period of extra time to ensure Inter won their first Super Cup since 2010.
Weston McKennie had given Juventus the lead with a header in the 25th minute but Lautaro Martinez levelled from the spot ten minutes later before Sanchez sealed a 2-1 win in the 120th minute.
"This was a real game tonight," Allegri is quoted as saying by Sky Sport Italia. "It was a good test for us to see where we're at.
"They boys played a really good game, unfortunately football seems to have been invented by the devil, and five seconds from the end we committed an error.
"We played against the strongest team in Serie A, we had several chances and conceded few. We could have avoided the two goals and done better at the beginning, in the first 10 minutes, when they had the upper hand, but then the team played well technically.
"It is a burning defeat – losing five seconds from the end and seeing the others celebrate hurts. I have nothing to blame,
"Now, awareness and anger must enter us to continue well in the league, the Coppa Italia and the Champions League.
"We have to look on the bright side: the kids are physically better and growing. Tonight did not go well, but now let's think about Serie A."