Sanchez, who came to power in June thanks in part to parliamentary support from 17 Catalan lawmakers, was depending on their votes to push his first budget through but they withdrew their backing.
All eyes are now on whether the socialist premier, who leads a minority government, will call early elections with opinion polls showing one outcome could be a right-wing majority in parliament, including a newly emerged far-right.
Sanchez's socialists are already adopting a campaign-like tone, accusing conservatives and Catalonia separatists of blocking a budget that included many social spending measures.
"Progressive forces in this country are at a critical moment due to this neo-liberal and far-right wave that is impregnating advanced societies," Budget Minister Maria Jesus Montero warned the lower house.
Conservatives accuse the socialist government of "high treason" for negotiating with Catalonia's separatist executive as Madrid tries to ease tensions with the northeastern region after a secession attempt in October 2017.
The budget also contained an increase in investment in Catalonia.
But with pro-secession leaders on trial for their role in the 2017 attempt to break Catalonia from Spain, separatist lawmakers Sanchez depends on filed amendments to block the budget last week.
On Friday, negotiations between Madrid and the Catalan government broke down, angering separatists.
The parliament approved their amendments on Wednesday with 191 votes in favour in the 350-member assembly, defeating the budget.
Sanchez' government would now in theory have to re-examine its budget and present a new, revised version.
In the current climate, though, with Sanchez left with so little parliamentary support, analysts predict he will call early general elections.
"Legally he is not obliged to do so," said Antonio Barroso, deputy research director at the Teneo analysis group.
"But politically, the question is whether the government would be justified (in not calling polls)."
Various opinion polls -- the latest published on Wednesday in online daily eldiario.es -- point to a right-wing majority in parliament post-elections formed by the conservative Popular Party (PP), centre-right Ciudadanos and far-right Vox party.
Even before the vote, the socialist government was accusing right-wing and separatist parties of opposing a social budget that contrasts with the austerity of Mariano Rajoy's previous conservative executive.
"After seven years of social injustice, right-wing forces and the independence movement will vote against a social budget," Sanchez tweeted on Tuesday.
"Both want the same thing: that Catalonia be at war with itself and that Spain be at war with itself."