AC Milan had the better of the chances but substitute Dybala scored 13 minutes from time to secure victory for the eight-time defending champions.
Juventus restored their one-point advantage over Inter Milan in the Serie A standings after Antonio Conte’s side’s 2-1 win over Hellas Verona on Saturday.
AC Milan arrived at Allianz Stadium with just one win in their last four matches but forced Juventus goalkeeper Wojciech Szczesny into several tough saves in the first half.
Ronaldo has struggled with a knee injury recently and was substituted for the second straight match early in the second half. The Portugal international did not look happy and walked straight down the tunnel.
But the substitution was to pay off when Dybala collected the ball from Gonzalo Higuain, dribbled his way into the area and fired into the bottom left corner.AC Milan slip to 14th, just four points off the relegation zone.