Fiorentina led through a third-minute Josip Ilicic penalty, but former Viola winger Juan Cuadrado quickly cancelled out the opener before Mandzukic and Dybala secured the win late on as Juventus continued their resurgence to move within six points of leaders Inter Milan.
© Getty Images
The protests were ignored by the officials and Josip Ilicic capitalised to power home his penalty, despite seeing Gianluigi Buffon get his gloves to the ball.
Fiorentina's lead lasted just three minutes as Patrice Evra used space on the wing to send a deep cross to Juan Cuadrado, who found the back of the net with a looping header against his former club.
Massimiliano Allegri watched his side settle the better after such a frantic opening, but chances were rare before the break as the visitors looked to keep the likes of Paul Pogba and Paulo Dybala as quiet as possible.
Dybala threatened to hand Juventus the lead on a fine solo run to the edge of the box, but he could only send a tame effort straight at Ciprian Tatarusanu.
It was Juventus who asked more of the questions either side of the interval as Fiorentina dropped deeper to protect what would have been a good result, and despite the home side dominating possession, Paulo Sousa's men coped with ease for long spells.
Mandzukic looked to be one of the candidates to be coming off as the hosts struggled to find a breakthrough, and the Croatian appeared to waste the best opportunity of the second half when he miscued his header wide from Dybala's free kick.
© Getty Images
Keeping the former Atletico Madrid strike on the pitch proved to be key as he fired a rebound into the roof of the net with 10 minutes of normal time remaining after Dybala's heavy touch at the end of a counter-attack allowed Tatarusanu to initially make the save.
Tatarusanu came to the rescue moments later to keep his side in the game with a superb save from Stefano Sturaro's header.
However, Fiorentina had tired quickly and were unable to stop Juventus from securing the points in stoppage time as Dybala capitalised on a loose ball to sprint into the box before slotting past Tatarusanu to close the gap on their title rivals.