Donnarumma, however, impressed one and all once again by producing a series of saves. Marko Pjaca, who got a rare start due to unfit Mario Mandzukic on the left wing, forced Donnarumma to dive right in the fourth minute.
Medhi Benatia struck inside 30 minutes for Juventus as he intercepted a Milan counter attack, completing a series of one-twos before burying the ball in the back of the net.
Milan slowly grew into the game and equalised from its first chance of note, Bacca slotting the ball past Gianluigi Buffon with a clever finish from what seemed like an offside position after being sent clean through on goal by Gerard Deulofeu.
Later, Miralem Pjanic's free-kick was turned onto the bar by Donnarumma and Leonardo Bonucci's header was diverted off target.
The 18-year-old Milan goalkeeper produced a superb double save when he parried Sami Khedira's shot and then tipped Gonzalo Higuain's effort around the post from the rebound.
Ben Gladwell reports on Serie A, the Italian national team and the Bundesliga for ESPN FC, UEFA and the Press Association.
The penalty was awarded for handball by Mattia De Sciglio although Stephan Lichtsteiners cross hit him at point-blank range and, in any case, appeared to strike his stomach rather than his hand.
Juve pulled 11 points clear of second-placed AS Roma.
The Swiss global attempted to cross the ball into the box only for Milan defender Leonel Vangioni to be adjudged to have produced a handball, thus setting up Dybala's match-winning spot-kick. "I was already in the tunnel and I preferred not to see the penalty", Allegri said.
After a long consultation between the referee and the goal-line assistant, and amid furious Milan protests, Dybala converted the spot-kick in the seventh minute of stoppage time to give Juventus their 31st home league win in a row.
"We played very well".
"It was not easy as [Gianluigi] Donnarumma played brilliantly, making a wonderful save with seconds remaining".