With the home support spurring them on, Fiorentina took the lead in the 25th minute through former Basel striker Arthur Cabral.
Leading at half time, the Italian side were to carry their impressive performance level into the second period, and they were subsequently punished when Andy Diouf produced a superb individual goal to level the scoreline.
Basel completed the remarkable turnaround in stoppage time when Zeki Amdouni guided home his six goal of the 2022-23 Europa Conference League to secure a precious victory.
Heiko Vogel's side will return home in a buoyant mood, while Fiorentina have it all to do when they travel to St. Jakob Park next week.
Fiorentina started the contest on the front foot, and they produced the first meaningful chance in the fourth minute when Cabral glanced a header wide of Marwin Hitz's goal.
The Italian side have started the brightest, but it was the visitors who had the ball in the net in the opening 10 minutes.
However, Jean-Kevin Augstin's effort was swiftly chalked off for an offside infringement against Amdouni in the build-up.
Both sides continued to threaten to open the scoring, as Jonathan Ikone forced Hitz into a comfortable save, while a Diouf volley drew a smart stop from Pietro Terracciano.
Basel would have been acutely aware of Cabral's goalscoring exploits after the Brazilian racked up 65 goals in 106 appearances for the Swiss outfit.
However, there was nothing the visitors could do to prevent Cabral from scoring his 16th goal of the season in the 25th minute.
Cristiano Biraghi's out-swinging corner found Lucas Martinez Quarta, who nodded the ball into the path of Cabral to head home.
Fiorentina took a narrow lead into half time, but they seemingly took their foot off the gas after the restart.
A poorly timed effort from Rolando Mandragora was as good as it got for the hosts in the second half, and their inability to capitalise on their first-half performance allowed Basel to fight back.
The Swiss side managed to restore parity in the 71st minute when Diouf played a neat one-two with Taulant Xhaka on the halfway line before driving towards the edge of the box and steering the ball into the bottom corner with a precise finish.
Basel would have been content with the draw, but they managed to snatch precious victory in stoppage time.
Michael Lang flicked on a free-kick from the right flank into the path of Darian Males, who cut the ball back for Amdouni to drive home the winning goal.