At the end of the season the club was declared bankrupt, and Gazzi and all the players on the team were released on a free transfer.
In July 2004 he moved definitively to Bari in Serie B, along with his coach and teammates Vincenzo Santoruvo and Lorenzo Sibilano.
[2] He made his debut in the top flight on 11 February 2007 in a win against Torino, and played 9 games until the end of the season.
Thanks to his contribution, the team, then led by Walter Mazzarri, attains salvation in spite of an 11-point deduction due to the 2006 Italian football scandal.
On 22 September, during a game against Ravenna, he suffered an eye injury which forced him into hospital and resulted in two weeks on the sideline.
In the 2008–09 season, with 39 appearances, Gazzi was one of the most active players in the promotion of Bari into Serie A, coached by Antonio Conte.
The anchor of the midfield, made his debut under Giuseppe Sannino on 11 September against Catania and scored his first goal for the bianconeri 20 November, in a home game against Atalanta.
Known for his professionalism and consistency, he is a tenacious player of great physicality and determination, who possesses a strong left foot.