Juventus' lead at the top of Serie A is down to just one point after Nikola Kalinic and Milan Badelj scored to give Fiorentina a surprise victory.
Former Blackburn forward Kalinic drove the opening goal into the far corner of the net after being played in by Federico Bernardeschi.
Badelj was credited with the second after his cross drifted in, apparently without anyone else touching it.
Gonzalo Higuain pulled one back, but Paulo Sousa's men held out.
With Roma winning 1-0 at Udinese earlier on Sunday, Max Allegri's side have seen their advantage at the top cut significantly, although they have a game in hand on the three sides immediately behind them.
Juve had won their first two matches of 2017, swatting aside Bologna 3-0 in the league and defeating Atalanta 3-2 in the Coppa Italia.
But they were second best to a Fiorentina side with a point to prove after underperforming in Serie A this season.
Matias Vecino hit the post for the home side in the first 10 minutes after a mazy run, and Juve keeper Gianluigi Buffon, returning after a bout of flu, had to get down well to beat out a Federico Chiesa shot.
Higuain had a penalty appeal rightly rejected just before half-time when his close-range shot was charged down by the thigh, not the hand, of Max Olivera.
Buffon made a fine save to stop Bernardeschi's cushioned volley, but was caught out as Badelj, linked with Chelsea, floated in a ball that eluded the stretching Chiesa in the middle and bounced into the net.
Higuain tapped in from close range after Sami Khedira's cross came to him via two deflections, and then sparked a goalmouth scramble after his header from a free-kick bounced loose off goalkeeper Ciprian Tatarusanu.
But the home side should have had a third goal in stoppage time, as Kalinic played substitute Josip Ilicic clear, only for the Slovenian midfielder to mess up as he tried to go round Buffon, running the ball out of play.