The House voted 230 to 176 last night to approve legislation to repair the Gramm-Rudman-Hollings budget-balancing law.

The budget law amendment, attached to legislation raising the federal borrowing ceiling, provides for a new mechanism requiring automatic reductions in spending if Congress and the White House cannot agree on measures to reach mandated deficit targets. That mechanism replaces one struck down by the Supreme Court last year, and is designed to pass constitutional muster.

The Gramm-Rudman-Hollings measure faces a tougher battle in the Senate, which will take it up today, and an uncertain future if it hits the president's desk for signature.

"I think we'll have a fight on our hands," said Senate Finance Committee Chairman Lloyd Bentsen (D-Tex.), anticipating opposition from the ranking Republican on the Budget Committee, Sen. Pete V. Domenici (N.M.).

White House spokesman Marlin Fitzwater said the administration has not taken a formal position on the legislation, but stressed President Reagan's "concerns about any fix that cuts the budget for defense and raises taxes."

Though the expected revival of the budget law increases chances of continued progress in reducing the deficit, which peaked at $220 billion last year, it represents a tactical retreat by the Democratic-controlled Congress in its long-running budget battle with the administration. It is also a tacit admission that Congress lacks the power to enact a major tax increase in the face of implacable opposition by the president.

If enacted, the rejuvenation of Gramm-Rudman-Hollings would require a $23 billion cut in the federal deficit in the fiscal year that begins Oct. 1. That would lower the deficit to about $144 billion from what it would be without changes in current spending or taxing patterns.

However, in the nine months since Congress began considering the fiscal 1988 budget, the Democratic leadership has had to scale back its deficit-reduction plans. The budget adopted in June by Congress called for reducing the deficit by $37 billion -- $19.3 billion of it through a tax increase.

In addition, the goal for achieving a balanced federal budget by fiscal 1991, set when Congress adopted Gramm-Rudman-Hollings in 1985, has been postponed until fiscal 1993. The deficit target for fiscal 1988 would be $36 billion above the law's original goal, and the target for the following year -- $136 billion -- is almost double the original goal of $72 billion. Those provisions delay the bulk of the cuts until after the 1988 elections.

House Minority Leader Robert H. Michel (R-Ill.), who joined many GOP colleagues in backing the compromise legislation, yesterday acknowledged the modesty of the new deficit goals.

"Just as beauty is in the eye of the beholder," Michel said, "so is progress on the deficit . . . . We should look at it as the beginning . . . of a bipartisan process to do something real about the deficit."

In the face of Reagan's repeated pledges to veto any tax increase adopted by Congress, the Democratic leadership put its weight behind a Gramm-Rudman-Hollings revival as the only way to force the administration to the bargaining table.

The budget amendment would give Reagan a choice of agreeing to a tax increase now estimated at about $12 billion or accepting automatic cuts that would mean a substantial reduction in defense spending. The budget law requires that half of the automatic cuts come from Pentagon accounts and half from domestic spending, while shielding some key programs such as Social Security, welfare and veterans benefits.

The president would be given discretion in protecting military personnel from the automatic cuts, and could, with Congress' approval, shield some defense programs at the expense of others.

Under the legislation, the debt ceiling, now set at $2.3 trillion, would be raised to $2.8 trillion, enough to give the government borrowing authority through May 1989. When Reagan took office, the debt ceiling was about $1 trillion.