The Supreme Court, acting on the last day of its 1985 term, struck down the key element of the Gramm-Rudman-Hollings budget-balancing law yesterday, ruling that its novel provision for automatic budget cuts was unconstitutional.

The court, in a 7-to-2 ruling, said that Congress' unprecedented attempt to control soaring budget deficits violated constitutional separation-of-powers principles, improperly vesting executive branch authority in a legislative branch officer, the comptroller general.

The court's ruling drew a vigorous dissent from Justice Byron R. White, who said the court was striking down "one of the most novel and far-reaching legislative responses to a national crisis since the New Deal," on the basis of "rigid dogma" and a "triviality."

Retiring Chief Justice Warren E. Burger, in his last opinion for the court, agreed that "no one can doubt that Congress and the president are confronted with fiscal and economic problems of unprecedented magnitude." But, he said, quoting a prior High Court ruling, " 'the fact that a given law or procedure is efficient, convenient and useful in facilitating functions of government, standing alone, will not save it if it is contrary to the Constitution. Convenience and efficiency are not the primary objectives -- or the hallmarks -- of democratic government.' "

The law, enacted last December, sets annual targets for reducing the deficit over a five-year period, until it reaches zero, in fiscal 1991. Three agencies -- the Office of Management and Budget, the Congressional Budget Office and the General Accounting Office, which is headed by the comptroller general, were to determine whether Congress had met the yearly target. If the target were not met, the GAO would have had the final word on the size and nature of automatic across-the-board budget cuts necessary to achieve the goal. The president would be required to implement the determinations.

Under the Constitution's separation-of-powers principles, Burger said, Congress is given the power to pass laws to set general policy. The authority to carry out the laws is given to the executive branch, under the president. There is no doubt, he said, that the comptroller general is "subservient" to Congress.

"By placing the responsibility for execution of Gramm-Rudman-Hollings in the hands of an officer who is subject to removal only by itself, Congress in effect has retained control over the execution of the act and has intruded into the executive function," Burger said. "The Constitution does not permit such intrusion."

The ruling sharply undercut the law's unique power to force the GAO to implement unpopular spending cuts, thereby protecting Congress and the president from the political consequences of such cuts.

The ruling means that Congress, under a fallback provision included in the law, will have to vote on those budget cuts, which some observers say in effect means business as usual.

Rep. Mike Synar (D-Okla.) and the National Treasury Employes Union, who challenged the law, hailed yesterday's ruling. Synar said the justices, affirming a lower court ruling last February, were insisting that there be "no more gimmicks, no more tricks, no more easy answers. Congress must do its job," he said, and make "the hard choices."

The law's chief sponsors said they would try to amend it to pass constitutional muster.

Reacting to the decision, Sen. Phil Gramm (R-Tex.), one of the law's sponsors, said he would introduce legislation to make the comptroller general independent from Congress to meet the court's objections.

That amendment would face significant opposition in both parties, observers said yesterday, particularly in the Democratic-controlled House.

While the court's action removes the law's most potent weapon, its supporters say election-year politics might pressure those who voted for the bill to meet its deficit reduction targets anyway.

President Reagan, who signed the bill into law but urged the trigger be struck down, said the targets "were and are a promise to the American people" and called on Congress to "make good on that pledge."

The decision, upholding a special three-judge panel decision last February, was long predicted. Even the law's most ardent supporters thought they might find, at most, two or three justices to approve it. In addition, ABC News Supreme Court correspondent Tim O'Brien, in a rare leak from the court June 15, reported that the law would be struck down the next day on a 7-to-2 vote and that Burger was writing the opinion.

The provision on the comptroller general was a political compromise worked out after the House balked at initial proposals to give the OMB or any administration-controlled agency discretion in determining where the cuts would be made. The House insisted on the inclusion of the comptroller general as the final arbiter because Democrats feared executive branch officials might try "cook the numbers" to achieve their aims.

The court's ruling leaves intact a "fallback" procedure, included in the law because Congress feared the court would rule as it did. Under the fallback, OMB and the CBO would still calculate how much spending would have to be cut to meet deficit targets.

But both the House and Senate would have to approve the cuts in a joint resolution. If either the House or the Senate refused to pass the resolution or if the president refused to sign it, that would end the process.

Those challenging the law, in addition to attacking the GAO's role, contended that it violated the Constitution also on the broader grounds that Congress had improperly given away essential lawmaking powers to the comptroller general. Burger rejected that "undue delegation" argument.

Justice John Paul Stevens, joined by Justice Thurgood Marshall, accepted the broader argument, however. "Neither the unquestioned urgency of the national budget crisis," Stevens said, nor the comptroller general's record of of sound judgment "provides a justification for allowing a congressional agent to set policy that binds the nation."

Justice Harry A. Blackmun, also dissenting, said that rather than strike down Gramm-Rudman-Hollings, he would prefer to strike down the 1921 law that put the comptroller general under congressional control.

The majority said it saw no need to address an argument, noted by the lower court, that cast doubt on the constitutional validity of independent agencies such as the Federal Reserve Board, the Securities and Exchange Commission and others. White, however, in his dissent, emphasized that the court was rejecting the notion that such agencies, part of what has become a "headless fourth branch of government," would be found unconstitutional.

The ruling is one in a series of major decisions in the past decade upsetting acts of Congress on separation-of-powers grounds. The Burger Court, ordinarily reluctant to void congressional actions in other areas, struck down the legislative veto in 1983, an appointment procedure for some members of the Federal Election Commission in 1976 and a new bankruptcy court system in 1982.

House counsel Steven Ross, who asked the court to uphold the law, said the ruling yesterday was "judicial activism of the worst kind." In earlier rulings, he said, the court could point to constitutional provisions for justification. Yesterday's ruling in Bowsher v. Synar was based, he said, on only a "general constitutional theory."