Spain struggled to break a stubborn Belarus side down in Mallorca, with Xavi breaking the deadlock himself with a fine strike in the 61st minute.
The world and European champions dominated possession but clear-cut chances were few and far between, with Xavi's goal coming out of nothing.
Alvaro Negredo came off the bench to head home Spain's second but they were given a late scare when Belarus substitute Sergey Kornilenko scored a powerful left-foot effort.
Captaining Spain in the absence of goalkeeper Iker Casillas, who sat on the bench, Xavi was relieved his side claimed all three points, leaving them needing to draw in their final Group I qualifier against Georgia in Albacete on Tuesday to be sure of a place in next year's showpiece in Brazil.
Xavi told Spanish television station Telecinco: "We weren't effective enough with the final pass but in the end we got the win and it's a very important step towards the World Cup.
"Alvaro's goal gave us some breathing room and at the end the Belarus goal gave us a bit of a shock but it turned out fine.
"It's tough when teams shut up shop at the back with all 10 players in their half."
Spain sit three points – and goal difference – ahead of France at the top of Group I.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.