The Republican-controlled Senate late last night approved, 50 to 49, a bipartisan budget resolution that would defy President Reagan by raising taxes $73 billion over the next three years while reducing his military buildup and spending more than he wants for domestic programs.

The Senate approved the fiscal 1984 budget alternative after some cliffhanging vote switches and a bitter, protracted struggle in which it voted a total of three times, by increasingly large margins, to reject a low-tax, high-deficit Republican budget supported by the White House.

Approval of the alternative amounted to a rare legislative triumph for Republican moderates, who spearheaded the effort to override Reagan's vehement objections to tax increases in order to bring down soaring deficits.

But even after winning key votes for their plan, the moderates and their Democratic allies almost lost on the final roll call. Only after Budget Committee Chairman Pete V. Domenici (R-N.M.) switched and voted for the budget as revised by the moderates, apparently in order to assure that the Senate did not deadlock permanently, did the plan pick up enough support to pass.

The Senate-approved budget now goes to conference with the House, which earlier approved a budget that exceeds what the Senate has proposed in the way of tax increases and domestic spending and cuts the defense spending buildup more than the Senate proposed.

Reagan has already indicated he might walk away from the budget if it differed radically from his own tax-and-spending blueprint and pursue instead a strategy of vetoing bills that he deems "budget-busters."

As approved by the Senate, the budget resolution calls for tax increases of $9 billion in fiscal 1984, $13 billion in fiscal 1985 and $51 billion in fiscal 1986.

These numbers are theoretically high enough--especially if raised in conference--to put pressure on Congress to modify the 10 percent income tax cut scheduled for July and later tax "indexing" to adjust tax rates for inflation. The House budget calls for a $30 billion tax increase next year, with larger increases to follow. An income ceiling on the July tax cut has also been suggested by Democrats.

In addition, the Senate-approved budget resolution calls for a defense spending increase of 6 percent after accounting for inflation. Reagan had requested 10 percent; the House approved 4 percent.

On domestic spending, the Senate approved $12.6 billion more than Reagan wanted, while the House approved $33 billion more.

The budget approved by the Senate calls for spending $849.7 billion for the 1984 fiscal year starting Oct. 1, with a deficit of $178.6 billion, considerably lower than the White House-backed plan's deficit of $192.4 billion.

While there are substantial differences between the House and Senate plans, Sen. Lawton Chiles (Fla.), ranking Democrat on the Budget Committee and the leading Democratic backer of the bipartisan plan, said he thought the conference would probably settle on a 5 percent increase for defense and the Senate's tax figure of $9 billion for next year.

The White House-supported budget, drafted by the Senate Republican leadership, was first defeated by the Senate last week. It reappeared on the floor yesterday after the Senate Budget Committee recycled it Wednesday in hopes of gaining votes, especially from GOP moderates, on a second try.

But the moderates--led by Sens. John H. Chafee (R.I.), Mark O. Hatfield (Ore.), Charles McC. Mathias Jr. (Md.), Robert T. Stafford (Vt.) and Lowell P. Weicker Jr. (Conn.)--held firm behind a modified version of their plan, proposed by another moderate, Slade Gorton (R-Wash.).

The leadership budget was first rejected, 56 to 43, yesterday afternoon and then, after Domenici attempted to revive it, it was turned down 57 to 43.

In both cases, a coalition of Democrats and nearly a dozen moderate Republicans were responsible for the defeats.

Between the two votes on the leadership plan, the Senate turned down, 52 to 48, the bipartisan compromise, which split the Democrats despite the support of the Senate's Democratic leadership.

But the Democrats served notice that they would attempt to revive the bipartisan plan in the midst of the final voting on the leadership plan, and the Republican moderates, despite entreaties from party leaders, refused to buckle under party pressure to close ranks behind the Reagan-backed plan.

At one point, in appealing for the leadership plan, Domenici warned both sides in the dispute that Congress would face "chaos" if the budget stalemate continued.

Referring to the White House, he said, "I'm not sure they want a budget." In voting against one budget alternative or another, Reagan's foes may be doing "exactly what they the White House wants," he continued. Moreover, Domenici added, the Senate risks destroying its own budget control process and inviting "veto after veto" of tax and spending bills that Reagan doesn't want.

"We're going to have chaos in Congress if we don't have a budget resolution," he said.

On the initial vote against the Republican leadership's budget, which the White House had endorsed reluctantly to fend off plans that would do greater damage to President Reagan's budget priorities, 10 Republicans joined all Democrats in opposition.

This was an even bigger defeat for Reagan and the Republican leadership than the 52-to-48 vote against the plan last week, before it was blessed by the Budget Committee.

As modified slightly by the committee, the leadership plan called for less defense spending and more domestic spending than Reagan wanted. But it would have preserved his tax cut program, which the moderates' plan put in at least theoretical jeopardy by calling for legislation this year to impose $73 billion in new taxes over the next three years.

In debate over the plan, Chiles called it a "plan for catastrophe . . . for a recession like we've never seen in this country" because the big deficits caused by low taxes would send interest rates soaring again.

On the final vote, 21 Republicans and 29 Democrats supported the budget resolution. Maryland's senators voted for it; Virginia's senators voted against it.