The former Barca midfielder oversaw a 1-0 win over Espanyol last weekend after taking the reins from Ronald Koeman, but it looked like he would be denied another victory on Sunday (AEDT) when Samuel Chukwueze cancelled out Frenkie de Jong's opener.
Memphis Depay came to Barca's rescue, though, with a vital goal in the 88th minute, before Philippe Coutinho added a third from the penalty spot in stoppage-time.
Not only was it Barca's first away win in LaLiga this season, it was also the first time it has won back-to-back games in the competition this term.
The win over Espanyol was followed by a 0-0 draw with Benfica in the UEFA Champions League in midweek, and Xavi says the victory at La Ceramica was comfortably the worst his side has played across his first three games in charge.
"It was very even, Villarreal is a great team," he said. "Of the three games that I have played, it is the one that we have dominated the least and the one that we least deserved to win.
"Today could have ended up as a draw and instead we are leaving with a victory. That is tremendous and gives us a lot of morale.
"It is a spectacular victory that gives us a lot of morale to continue growing. This victory gives us life.
"That game was the minimum required. Belief, attitude, respect for the badge, and hard work; they are the foundations of a team. Today was a victory of team spirit. When we do not play well, we also have to win. We are Barca."
Both sides had cause to be frustrated with the officials during a chaotic opening 10 minutes.
Villarreal midfielder Dani Parejo was fortunate to escape a red card for a shocking early challenge on Sergio Busquets, while Gerard Pique went unpunished for a blatant handball in the penalty area soon after.
Xavi refused to criticise the officials, though, adding: "In the end, I will not talk about the referees. It is a very difficult job and I will not put myself into it.
"In the end, it is the referee who decides. One day he can help you and another day harm you. It is difficult to be a referee."
Jordi Alba was replaced by Oscar Mingueza in the 71st minute after sustaining an injury, with Xavi revealing the full-back fought through the pain barrier to continue.
"At half-time it looked like he could not continue, but he has made a brutal effort to carry on," the Barca boss said. "He is an example; he is one of the captains, and he is pushing us forward. Jordi has made an effort until he couldn't take any more."