Sunday's trip to Montjuic looked like a stern test for Girona following their spectacular start to the season, but Michel's men did not appear nervous and took the lead through Ukrainian striker Artem Dovbyk after 12 minutes.
Barcelona soon got back into it, though, as Robert Lewandowksi levelled with just 19 minutes played.
Girona then took the lead again five minutes before half-time through left-back Miguel Gutierrez, previously of Real Madrid.
There were chances for both teams in the second half, but Girona struck another blow 10 minutes from time as Valery Fernandez made it 3-1.
With time running out, Ilkay Gundogan then netted in added time to set up a stirring finale at Montjuic.
And there was time for another goal too, but it went to Girona as Barça left spaces and Cristhian Stuani made it 4-2.
Girona's win takes them back to the top of the table, with 41 points from their 16 games, having won 13 and lost only once in LaLiga this season.
Real Madrid are two points back in second, while Barça are down in fourth place, seven points behind Girona and five adrift of Los Blancos.
Xavi's side are level on points with Atletico Madrid, having played one more match than the Rojiblancos.
More LaLiga stories
Jude Bellingham ahead of Zinedine Zidane and Luis Figo? One of their former Real Madrid team-mates explains how England midfielder has the edge on the two legends
Terry Venables dies at 80: Former Barcelona players give their reaction after El Tel's passing
Thank you for reading 5 articles this month* Join now for unlimited access
Enjoy your first month for just £1 / $1 / €1
*Read 5 free articles per month without a subscription
Join now for unlimited access
Try first month for just £1 / $1 / €1