In less time than it usually takes to clear its throat, Congress in two months has bailed out the Social Security System and has made a belated downpayment on recession relief, remarkable bipartisan achievements in light of earlier political turmoil over both issues.

But even as Congress and President Reagan were striking this blow for consensus politics, they were also bashing each other over tax and spending policies as the Democratic-controlled House passed what some GOP members called a "revenge-on-Reagan" budget and the Republican-controlled Senate was edging nervously toward defying him on defense spending.

"This Congress has had three goals: Social Security, jobs and the budget," said a jubilant House Speaker Thomas P. (Tip) O'Neill Jr. (D-Mass.) late Thursday as Congress prepared to head home for its spring break. "We have met all three."

When the 98th Congress convened in January at the midpoint of the Reagan administration, with House Democratic ranks strengthened by the November elections, a key question was whether the session would be dominated by compromise or confrontation.

The answer, at least so far, appears to be a little--or maybe a lot--of both.

In the case of Social Security, both parties had a big political stake in solving the financing problem. Social Security had been a tar baby for Reagan for years, and Democrats, although they profited from exploiting his history on the issue in November, could not afford to stand in the way of a long-term solution to the system's financing.

"Social Security is something of a triumph of the system," Sen. Slade Gorton (R-Wash.) said. "When a big problem gets bad enough, politics tends to get muted."

The House underscored Gorton's point when, as it passed the Social Security compromise shortly before midnight Thursday, members from both sides of the aisle rose to applaud its architects.

On jobs and humanitarian aid for victims of the recession, a reluctant president, after resisting spending for jobs creation, bowed to pressure from both parties in Congress and signaled his willingness to accept a modest jobs and aid program.

And Congress, facing a veto unless it restrained its appetites, settled for a $4.6 billion program that Reagan would sign even though it will hardly make a dent in unemployment and other suffering from the recession.

Reagan came out well because he got rid of the vexing Social Security issue and blunted, at least temporarily, the charge that he was ignoring effects of the recession.

But he compromised at considerable expense to the philosopical underpinnings of his economic program by agreeing to tax increases as well as benefit reductions for Social Security and tacitly acknowledging a role for government spending in ameliorating the recession, even with what he had previously scorned as "make-work" jobs.

And, in effect, Reagan had to give Congress, especially the Democrats, a greater voice in shaping policy, affording O'Neill and others an opportunity to claim they were demonstrating once again their capacity to help govern after two years of wandering in a political wilderness.

The budget presents a somewhat different situation.

Nearly everyone agrees that compromise between the two parties will be necessary in the end if Congress is going to have any budget at all, a political necessity in light of the fact that the alternative is probably deficits of intolerable proportions.

But, in the meantime, the budget for the 1984 fiscal year starting Oct. 1 presents a wonderful national arena for the staging of political morality plays that are increasingly beginning to look like dress rehearsals for the 1984 campaigns.

Reagan accuses the House Democrats of bringing "joy to the Kremlin," even though the 4 percent after-inflation defense spending increase they proposed was only slightly lower than the 5 to 6 percent increase that Senate Republicans have been talking about. The president sought a 10 percent increase.

Democrats accuse Reagan and the Republicans of risking "fiscal anarchy" by offering no alternative to the Democratic budget, a debatable but flashy way of calling attention to the fact that the once unbeatable Reagan forces in the House had been rendered impotent, at least for the time being.

The Democrats clearly took the first round by demonstrating that they can put together a winnable budget that asserts traditional Democratic values, including more social welfare spending and the taxes to pay for it.

And, although Republicans claim it is deceptive, the Democratic deficit managed to come in officially lower than the deficit Reagan projected in his January budget: $174.5 billion as opposed to $188.8 billion.

But Republicans, taking solace where they could, claimed they won a victory in disguise because they can wave the House budget around back home as proof that the Democrats have gone back to their old "tax-and-spend" ways, inviting a return to bad old days of soaring inflation.

Leaving aside the numbers games and rhetoric, the situation at this early stage of the 98th Congress helps restore political balance that was absent from the 97th Congress, when Democrats, searching for new moorings after the blow of the 1980 elections, could achieve little more than damage control for their programs.

In other words, Democrats are acting more like Democrats and bidding against Reagan from a position of more nearly equal strength, which contributes to opportunities for confrontation and to the necessity for compromise when it really matters.

It is a situation that was probably inevitable, said Rep. Leon E. Panetta (D-Calif.). After compromising on taxes last year and on Social Security and jobs this year, "It was only a matter of time before Democrats had to put together something that would appeal to Democrats as a party . . . . The budget was an expression of what we're all about, so there wouldn't be any more confusion."

The cries of rage from Republicans are natural "whenever you slam-dunk something through," Panetta said in a concession that the Democrats used the raw power of numbers to get their way on the budget, just as Republicans and their conservative Democratic "Boll Weevil" allies did in 1981 and 1982.

But there will have to be bipartisan compromise in the end, he said, even though many Republicans were claiming that the Democrats' steamroller tactics were making compromise impossible.

The situation could be complicated on all sides by what everyone is seeking: economic recovery.

It would undoubtedly strengthen Reagan's popularity and thereby enhance his clout with Congress. But, to the extent that it brings about lower deficits through more revenues and less of a drain on relief programs, economic recovery could undercut his efforts to continue squeezing domestic spending in the name of smaller deficits.

For the Democrats it would mean loss of a major tactical advantage that comes from failure of the administration's economic policies to bring about recovery. For instance, a real economic surge could undercut Democratic plans for several ground-breaking initiatives, such as health insurance for the unemployed and an industrial development bank. It could also ease pressure for defense spending cuts, some lawmakers said.

The recovery, at least in theory, has nothing to do with Reagan's current Capitol Hill problems on foreign policy, including arms control and military assistance to El Salvador. But even some Democratic critics of his foreign policy concede that a resurgent and generally more popular president would be in a stronger position to win on these issues as well.

Democrats and Republicans alike will use the Easter recess to sniff out public response to Reagan's defense initiatives and Democratic spending programs for social welfare.

But, unless signs of recovery are coming quicker out in the country than most members of Congress were sensing before the recess, the balance of power in Washington--and the balance between confrontation and compromise--could remain uncertain for a while to come.