Pierre-Emerick Aubameyang struck the only goal of the game on Thursday night.
Xavi cut a relieved figure as the Cules held on.
"I am satisfied with the three points, it's a vital victory for the future of the team and the club," Xavi declared in his post-match press conference.
"I'm not satisfied with the game. We suffered in the second half. We have to be honest and self-critical. We haven't played well and we need to improve."
Barcelona were made to suffer
Real Sociedad caused the Blaugrana a lot of problems, with Xavi claiming that his team was made to suffer more than in any other match since he took charge.
"It's the game in which we've suffered the most, along with the one against Villarreal," he continued.
"We noticed our fatigue. In some phases, Real Sociedad."