Trailing 2-1 with four minutes remaining, Mario Santana equalised before second-half substitute Adem Ljajic struck the winner.
The victory lifted struggling Fiorentina, who had been just two places above the drop zone, to 12th in the Serie A standings with 23 points. Brescia dropped a spot to second bottom.
Fiorentina went into the game under a dark cloud with Romanian winger Adrian Mutu having walked out of training last week because of the club's refusal to sell him.
Mutu was left out of the squad to face Brescia, who made a good start as they searched for a vital win.
They took a 30th-minute lead when Panagiotis Kone fed Alessandro Diamanti and his right-footed effort from 14 yards beat Fiorentina goalkeeper Artur Boruc.
The goal inspired the visitors, who pressed forward more aggressively and were rewarded on the stroke of half-time as Nicolas Cordova's curled free-kick into the top corner beat Boruc.
Fiorentina could have cut the deficit in the 57th minute but Brescia goalkeeper Matteo Sereni kept out Gaetano D'Agostino's 25-yard strike.
The hosts reduced the deficit in the 72nd minute when Gilardino's eight-yard header from Riccardo Montolivo's cross beat Sereni.
Fiorentina pressured the Brescia defence in the late stages of the game and equalised in the 86th minute.
Sereni saved Khouma Babacar's thunderous strike from distance but was unable to hold onto the ball and Santana tapped in.
With Brescia reeling, Fiorentina got their third with two minutes remaining.
Ljajic controlled Gilardino's pass inside the area before driving the ball in with his right foot to send the home crowd into raptures.