It needed the risky introduction of forwards Alexis Sanchez and David Villa, leaving only three at the back, and a late double from World Player of the Year Lionel Messi to finish off the Russian visitors, who had taken a 2-1 lead but Vilanova did not complain.
"I'm not unhappy," Vilanova said. "We have attacked as we had to do. We have changed the way we played, we took risks and we won.
"I would have preferred to have won easily, but this game will serve us all well."
Pep Guardiola's former assistant has a tough act replacing a club idol who led the side to four consecutive Champions League semi-finals, and two European Cup triumphs on the way to a 14-trophy haul.
Vilanova was flirting with Barca's first home defeat in 17 European outings, before turning the game round to make it six wins from seven since taking the helm for this season.
Barca top La Liga with a perfect 12 points from four games, eight ahead of stuttering champions Real Madrid, and the only blemish on Vilanova's record is the Spanish Super Cup defeat at the Bernabeu last month.
The worries come for Vilanova in defence, where Spain defender Gerard Pique was forced off after damaging his left foot early on in Wednesday's game, putting him on the injury list for up to three weeks.
"I had thought about using (youth team player Marc) Bartra who hasn't played much up until now," Vilanova said.
"And I had Song who has a lot of experience, and someone we have bought in to fulfil this role."
It was a tough baptism by fire for Cameroon international Song at the back, but he may have to adapt quickly, especially with a 'clasico' against Real Madrid at the Nou Camp looming in two weeks' time.
A bright spot for Vilanova from the Spartak game, however, was the performance of academy winger Cristian Tello.
The pacy 21-year-old scored Barca's opener from distance and set up Messi's second with a run off the left flank and a pull-back in the area.
"He is having a great season," Vilanova said of a player keeping Spain striker Villa on the bench. "We already knew what he was capable of, and he knows what he is doing."