The World Cup winner, who made his 392nd Liga appearance to break a club record, settled the game against the nine-man hosts, with his free kick on 33 minutes proving to be the difference.
After the game coach Pep Guardiola said his men were lucky to get maximum points, and Xavi has echoed that view.
"It was a complicated game and we could not finish it off in the second half," Xavi is quoted as saying on AS.com.
"Granada never had a shot on goal, but then we never scored a second goal. It was a good game, but we missed getting the goal which would have offered us more tranquillity on the pitch.
"In general we did well, but there are still areas that we can improve."
Xavi scored his third goal in eight games this season - the same amount he achieved last term in 31 matches.
"It's always nice to score, and I am happy for the team above all else," he added.
Barcelona top the Primera Division, but they could be shifted by Real Madrid and Levante on Wednesday.
How do you stay up to date with football when on the move? With http://m.goal.com – your best source for mobile coverage of the beautiful game.