Artem Dovbyk put Girona in front in the 12th minute with a shot that bounced in off the bottom of the post before Robert Lewandowski equalised for the hosts seven minutes later, heading home following a corner.
Girona, who remain unbeaten away from home in LaLiga this season, top the standings with 41 points from 16 games, having leapfrogged Real Madrid on 39 points after Carlo Ancelotti’s side were held to a 1-1 draw by Real Betis on Saturday.
Barcelona, whose only previous defeat this season was to Madrid at the end of October, are fourth on 34 points, level with third-placed Atletico Madrid who have a game in hand.
“Girona have a lot of merit in what they are doing. They are in the lead, even more so today. They’ve got seven points more than us and that’s well deserved,” Xavi said.
“It was an even game. If Barca won, we would also say it’s fair. I think we shot 31 times. Maybe the errors in defence have taken their toll on us.”
Barcelona had 31 attempts in the game, 11 of them on target, but Girona keeper Paulo Gazzaniga pulled off a string of saves while at the other end they scored with four out of their seven shots on target.
Dovbyk put Girona in front in the 12th minute with a shot that bounced in off the bottom of the post for his eighth goal in his debut LaLiga season.
Lewandowski rediscovered his goal-scoring form and equalised for the hosts seven minutes later, heading home following a corner.
It was the Poland striker’s first goal for Barca in nearly a month, following his brace against Alaves on Nov. 12.
Gutierrez restored Girona’s lead before half-time, after the defender broke into the box and scored with an individual effort, and Fernandez made it 3-1 in the 80th minute with a low shot two minutes after coming off the bench.
Gundogan pulled another goal back for Barca before Girona’s Stuani scored their fourth in stoppage time.
“This Girona side have a soul and believe they can hurt their opponents,” coach Michel said.
“We knew that [Barca] were going to press hard but if we were able to make the first two passes, we would stand a chance.”