The pledge came after Yosef Lapid, the Shinui Party leader, was pressured by the United States to come up with the votes needed to pass the budget.
Lapid has been a strong advocate of the plan to quit Gaza, which polls show most Israelis support.
"Shinui's concern about implementing the withdrawal and continuing the peace process was the decisive factor," Lapid said after meeting Sharon at his ranch on Saturday.
The 15-member Shinui Party is the third-largest in Israel's parliament.
The deal included $160 million in funding for Shinui priorities such as university students and reserve soldiers.
Sharon has been scrambling for support to get the budget passed by 31 March. Failure would mean early elections and a delay of the Gaza pullout.
"It doesn't surprise us that Lapid supports expelling Jews"
Gaza settler spokesman
The votes of the secular Shinui should allow Sharon to pass the budget despite a rebellion in his right-wing Likud by deputies opposed to evacuating Jewish settlers from the Gaza Strip, where Palestinians want a state.
The plan to remove all Gaza settlements and four of 120 in the West Bank this summer has Washington's blessings and has been touted as a possible step towards new Middle East peace talks.
Optimism for peace has grown since Israelis and Palestinians agreed to an informal ceasefire last month.
But settlers oppose ceding land captured in the 1967 war that they see as a biblical birthright, saying it would also reward Palestinian violence.
Opponents of a pullout had hoped to use the budget vote to force Sharon to agree to their calls for a referendum on the withdrawal, if not bring him down.
Lapid came under US pressure
to support Sharon's Gaza plan
"It doesn't surprise us that Lapid supports expelling Jews," said Gaza settler spokesman Eran Sternberg.
Shinui quit the government late last year after Sharon wooed an ultra-Orthodox faction to join it in exchange for more funding.
The prime minister's coalition has been fragile since the loss of former right-wing allies who left in anger over the Gaza plan.
Sharon was later able to bring in the centre-left opposition Labour Party to give him a working majority in parliament, but the rebellion within Likud ranks still threatened to bring down the government.