Congress learned yesterday that a decade's hard-won gains in its perpetual struggle for power with the president could be wiped out in an hour by the Supreme Court.

The decision striking down the "legislative veto" of executive branch actions erased many of the major actions Congress took in the 1970s to curb what lawmakers then called "the imperial presidency."

There was immediate anger on Capitol Hill, but among students of government and constitutional scholars, a surprising number said the presidency might ultimately be the loser from the court's efforts to protect its prerogatives.

They echoed the warning in Justice Byron R. White's dissent that rather than "abdicate its lawmaking function to the executive branch and independent agencies," Congress may "refrain from delegating the necessary authority" for future administrations to do their job.

Sen. Henry M. Jackson (D-Wash.) predicted that the decision "will make partnership between the branches in foreign policy more difficult," and Sen. Lowell P. Weicker Jr. (R-Conn.) said Congress may choose to abolish regulatory agencies it can no longer control.

In the meantime, however, President Reagan and his appointees apparently have been freed from congressional constraints their predecessors were forced to accept on spending money, selling arms, committing troops, writing regulations and dozens of other functions.

And Reagan's predecessor was cheering. Former president Jimmy Carter told The Washington Post he was "very grateful" for the decision, which he called "a great step forward in preserving the proper relationship between the legislative and executive branches." Carter recalled his own protests against legislative vetoes and said he had sought exactly the kind of court test that came yesterday.

There was some uncertainty about how far the impact of the Supreme Court decision would reach, with Carter and former senator Jacob K. Javits (R-N.Y.), chief sponsor of the War Powers Act, saying they could not believe the court intended to strike down the requirement that Congress be able to approve a long-term commitment of U.S. troops to a combat zone.

But most commentators disagreed. "It the decision is incredible in its reach," said Norman Ornstein, a visiting scholar at the American Enterprise Institute and a specialist on legislative-executive relations. Many members of Congress made it clear they thought the court's reasoning was simply incredible.

Rep. Elliott H. Levitas (D-Ga.), a strong advocate of the legislative veto, said the door was opened to "government by the tyranny of the bureaucracy" unless Congress found a way around the court.

"If this decision is broadly interpreted, you'll see the largest shift in the process of government that has ever occurred in my lifetime," Levitas said. "Wait until the first proposal to sell F16s to Jordan comes up and Congress finds out it doesn't have any say-so in the matter."

The Supreme Court has before it two similar cases involving the legislative veto, and Levitas held out hope that the court would use those cases to limit the impact of yesterday's ruling.

But he isn't holding his breath, and in a news conference, he and Sen. Charles E. Grassley (R-Iowa) announced that they would take immediate steps to try to reclaim the powers Congress lost in court yesterday. Grassley said his Judiciary subcommittee would begin cataloguing the authority that has been delegated by Congress to the executive branch and exploring ways "in which Congress can repossess power."

The legislative veto goes back about 50 years, when Congress gave President Hoover authority to reorganize executive branch agencies, subject to its veto. The arrangement was not particularly controversial until the 1970s, when a Democratic Congress, reacting to both the Vietnam war and President Nixon's refusal to spend appropriated funds, unleashed a wave of new restrictions on the executive branch.

Although yesterday's Supreme Court decision involved only a congressional vote overruling a deportation decision, the language of the majority opinion, written by Chief Justice Warren E. Burger, seemed to sweep aside all the "second-look" devices Congress has invented to curb executive branch and regulatory agency discretion.

Those curbs had been criticized by all recent presidents of both parties. In his 1980 campaign, Reagan advocated giving "Congress veto power over all federal regulations," but once in office, he, like his predecessors, regularly noted his disapproval of the restrictions Congress put on him.

David R. Gergen, the White House communications director, said, "The ruling is consistent with the administration's view of the legislative veto, which we always have argued is constitutionally impermissible." Gergen said he expected "Congress in the future will be much more precise in drafting legislation."

A senior Office of Management and Budget official said yesterday that the administration had anticipated the decision but would be cautious about exercising its new freedom from congressional second-guessing. "The reaction will be tailored to particular statutes," he said.

And another senior official, dealing with national security matters, said the first reading of the decision was that future arms sales might still have to be sent to Congress for 30 days' scrutiny, but that Congress could not block a sale by concurrent resolution, because that gave the president no chance to veto the action.

The strongest support for the decision came from people who claimed Congress used its right to veto regulatory decisions as a way of paying off special-interest constituencies.

Sen. Bob Packwood (R-Ore.), who led an unsuccessful effort last year to block Congress from softening Federal Trade Commission regulations on used-car dealers, said that in that instance, "we saw how vulnerable the Congress can be when confronted with the tough decision to protect hundreds of thousands of consumers, instead of a handful of persuasive car dealers."

Alan B. Morrison, who argued the winning side in the Supreme Court for the Ralph Nader-backed Public Citizen Litigation Group, would stop Congress from "making itself look good by passing these broad laws, and then pulling the rug out when no one is looking except the special interests."

But critics of the decision, like Levitas and Stanley Brand, chief counsel to the House of Representatives, who argued for the losing side, said the ultimate result would rebound against those claiming victory. "We can keep the executive branch on a short leash in terms of its authorization and funding," Levitas said.

Joseph Cooper, dean of social sciences at Rice University and author of several recent studies on the legislative veto, said detailed legislation could be counterproductive. "Do you really want to ask Congress to spell out all the conditions for arms sales?" he asked. "That's a highly unrealistic approach. It will inevitably hamstring the administration."