The Catalan side have now picked up a maximum 15 points from their opening five games.
But for most of Saturday’s match they looked off-colour and appeared to be heading for a draw until Xavi’s goal four minutes from the end which was then followed by an own-goal from Borja Gomez.
It was tough luck on Granada goalkeeper Tono Rodriguez who had produced some excellent saves, but in the end he was helpless to stop Xavi’s strike from the edge of the area which went in off the crossbar.
“It was nice to score the goal which practically gave us the win. I just saw the keeper slightly off his line and I hit it with the outside of my boot,” said Xavi.
“It was a difficult game as we’ve had before with teams which defend deeply and reduce the space but when you do score everything changes and that was the case here.
“At this stage of the season you can drop points but we are on a winning run even though it is very early and there are things we have to improve.”
Granada coach Juan Antonio Anquela looked to take the positives from the game rather than the result.
“At times we created doubts for such a big team and I cannot ask for more than that,” he said.
“The team made it very difficult for a great side who had to give their all. We were practically perfect and it appeared as though it wasn’t Barca’s day.”
The result now puts the pressure on Jose Mourinho’s Real Madrid side who face city rivals Rayo Vallecano on Sunday.
Barca had Alex Song alongside Javier Mascherano in a makeshift defence with Carles Puyol and Gerard Pique both in the treatment room while the in-form Adriano Correia continued at left back despite Jordi Alba being ready to return.
Granada have struggled so far this season but surprisingly they enjoyed plenty of possession early on.
Floro Flores took advantage of a misunderstanding between Song and Mascherano but shot weakly at keeper Victor Valdes after eight minutes and then Mikel Rico fired over from inside the area.
Barca had rested Xavi and with Andres Iniesta also out injured they were unable to play their usual flowing football and were guilty of giving the ball away cheaply.
Granada have been lacking organisation and discipline at the back but they found a new resolve with Barca unable to get a shot on target until midway through the first half with a Cesc Fabregas strike comfortable for Tono.
Granada then went close again when Siqueira skipped down the left wing and forced a good save from Valdes who tipped the ball behind for a corner.
As Barca fought to break down Granada, Inigo Lopez personified the visitors’ spirit as he dived in to block efforts from Lionel Messi and Thiago Alcantara, and the frustration was clear from the Catalan team as Messi and David Villa arguing between themselves.
After the break Barca came out with more verve but apart from a couple of half chances for Villa and Alexis Sanchez, Granada stood firm.
Coach Tito Vilanova threw on Xavi and Pedro Rodriguez but despite a late avalanche of opportunities for Barca it looked as though they would not score.
Toni made excellent saves from Messi, Fabregas and Xavi until the latter produced a special shot to put Barca ahead.
Then, in injury time, Granada’s misery was completed by an own goal from Gomez.
Earlier, Park Chu-Young became the first Korean to score in the Spanish league when he came off the bench to give Celta Vigo a 2-1 win over Getafe. Augusto Fernandez hit Celta’s opener with Abdelaziz Barrada equalising.
Zaragoza beat Osasuna 3-1 through goals from Helder Postiga, David Timor, who put through his own net, and Apono, with a penalty. Emiliano Armenteros got the visitors’ consolation.