The budget's passage means Sharon's government can no longer be brought down by opponents of a Gaza pullout set for the middle of this year.
After Sharon secured a majority by pledging hundreds of millions of dollars in special spending to three parties to secure their votes, the parliament approved the budget on Tuesday by 58-36 votes with one abstention.
The budget confrontation caps a turbulent political year, and illegal settlement leaders say they will now take their battle against the planned pullout to the streets, threatening mass protests and even civil war.
Failure to pass a budget by Thursday would have forced Sharon to resign, delaying or even torpedoing the plan to remove 21 Jewish settlements from Gaza and four from the West Bank in the summer.
Opponents of the pullout, including many in Sharon's Likud Party, prevented passage of the budget at the end of last year and continued to vote against the government on Tuesday, although it was clear that the budget would be approved.
Security officials fear increasingly desperate settlers will resort to violence to disrupt the pullout, including an attempt to attack a disputed holy site in Jerusalem or assassinate Sharon.
Public Security Minister Gideon Ezra said he picked up a warning that extremists among the colonists might open fire on soldiers who come to evacuate them.
Pinchas Wallerstein, a settler leader, said he and others would try to refrain from violence, but the situation might spin out of control. "We don't intend to compromise in the battle," he told Army Radio.
Lawmaker Effie Eitam, who quit Sharon's government last year over the pullout, said the evacuation is illegitimate.
Now that the parliament has repeatedly voted for it, he said opponents should "come to Gush Katif and be there by hundreds of thousands" to stop it.
The government has given the 8500 Gaza settlers until the last week of July to leave voluntarily, in exchange for compensation payments. After that deadline, the Israeli military will begin removing people by force.
So far, 66 settler families have negotiated an agreement with the government. It remains unclear how many more would leave voluntarily before the July deadline, and how many would choose to fight.
Israeli Vice-Premier Ehud Olmert said he believed protests against the pullout have already peaked, and settler activists would have trouble organising large rallies, now that they have lost the political fight.
The pullout has splintered Sharon's Likud Party and realigned the parliament.
Thirteen of Likud's 40 lawmakers hotly oppose the withdrawal plan and voted against the government.
Sharon's former allies - hardline, pro-settlement factions - deserted him, forcing him to bring his natural rival, the moderate Labour Party, into his government instead.