Pedri scored the only goal of the contest in the 61st minute, with the result moving the Catalan outfit six points ahead of the reigning champions, who are in action on Sunday night at home to Real Sociedad.
Barcelona were again missing leading goalscorer Robert Lewandowski through suspension, but the visitors managed to navigate their way to a hugely important three points against their Catalan rivals.
Xavi's side have now won their last eight matches in all competitions, including their last three in La Liga.
Girona had a shout for a penalty in the third minute of the contest when Yan Couto went down inside the box under a challenge from Marcos Alonso, but the referee was not interested.
A mistake from Paulo Gazzaniga almost gifted Barcelona an opener in the 15th minute, with the Girona goalkeeper taking an extra touch inside the box, but he recovered to keep out Ousmane Dembele, who had been found by Ansu Fati.
The visitors lost Dembele to an injury in the 26th minute, with the France international appearing to suffer a hamstring issue, which will now need to be assessed.
Barcelona finally made the breakthrough in the 61st minute of the contest, with Pedri finding the back of the net from close range after meeting a low cross from Jordi Alba.
Girona thought that they had equalised in the 65th minute through Valery Fernandez, who converted from close range, but the effort was chalked off for offside.
The home side, who had their manager Michel dismissed late on, had a huge chance to level in the final exchanges when Ivan Martin found himself free inside the Barcelona box, but the substitute guided his effort wide of the post, with the visitors collecting an important three points.
Next up for Barcelona is a trip to Real Betis in the league on Wednesday night, while Girona will be bidding to return to winning ways when they welcome Valencia on February 5.