Barcelona captain Andres Iniesta admits Alaves made it difficult for them after their 2-1 win.
Alaves took an early lead before Barca earned the victory through goals from Luis Suarez and Lionel Messi.
Iniesta said at the final whistle: "Because of how it has developed and how it has gone, it has been one of the most difficult triumphs we have won. Football is like that.
"When you are not completely fine it costs and football has these things, but the three points are very important. Football is not mathematics. Sometimes you are more fortunate and sometimes less but we have not stopped trying and it is not easy to overcome an adverse result and we have done it."
On new teammate Philippe Coutinho's performance, Iniesta added: "It is important that you leave feeling at ease. The quality of Coutinho and those who have come is beyond doubt."