Juventus won their sixth straight home match against AC Milan with a controversial 97th-minute penalty on Friday, the 2-1 result extending their winning run on home soil in Serie A to 31 games.
The Bianconeri looked on course to extend their lead at the top of the table to 12 points when Mehdi Benatia volleyed home Dani Alves' lovely chipped assist.
But Vincenzo Montella's Milan dug in deep and found the equaliser through Carlos Bacca - the Colombian taking his tally to four goals in his last three games after failing to find the net in his five outings before that.
The Rossoneri watched with baited breath as Gianluigi Donnarumma turned Miralem Pjanic's free-kick on to the post, but their resistance was ultimately to no avail as Paulo Dybala netted the winner from the spot in stoppages for a perceived handball from Mattia De Sciglio.
It is a result that extends the Italian champions' perfect record against Milan at Juventus Stadium, with the Turin outfit winning all six of their last games in the league against their rivals at the ground.
It ensures Juventus bounce back from their 1-1 draw at Udinese last time out in timely fashion ahead of their Champions League last-16 second-leg tie against Porto.