A Wall Street crisis, Soviet leader Mikhail Gorbachev and two jurists who stumbled on their way to the Supreme Court have combined to force President Reagan and the Democratic-controlled Congress to do what they have been unable or unwilling to do all year: deal with each other.

As a result, the two warring branches of government appear on the verge of agreements to resolve the year's most critical and intractable problems, including deficit reduction, arms control and a mutually acceptable choice for the Supreme Court.

These are basically shotgun arrangements, forced by mutually threatening circumstances, not fundamental reassessments that point to more constructive relations. Nor do they promise long-term solutions to the country's problems. But they may avoid the kind of governmental gridlock and poisoning of the political atmosphere that appeared likely only a few months ago.

"We're finally going to get something done because the alternatives are so bad. We're being leveraged by the alternatives," said Sen. Mark O. Hatfield (R-Ore.).

"It looks as though we'll have three solutions, all in the national interest," said Sen. J. Bennett Johnston (D-La.). "But I'm afraid it doesn't signal any change in the regrettable chill between the White House and Congress."

Laboring on their own, before the intervention of outside forces, the White House and Congress were hardly on speaking terms, talking at -- but not with -- each other. Democrats had the votes to pass legislation but not to override most vetoes. So long as the White House threatened a veto, which it did frequently, stalemate was assured.

Only a month ago, Reagan and Congress were deadlocked on the budget and headed toward a veto confrontation over arms-control legislation. The Senate was preparing to reject Robert H. Bork, the president's first choice for the Supreme Court, and Reagan was vowing to send another nominee who would be just as objectionable.

But then the stock market plunged, putting pressure on both sides to take prompt steps to cut the federal deficit, regarded as a factor in the global market turmoil.

After months of resisting a budget summit with Congress and threatening to veto any tax increases, Reagan put in motion the talks that now appear likely to produce a compromise deficit-reduction package encompassing tax increases as well as spending cuts.

Meanwhile, Reagan was also faced with a forthcoming U.S.-Soviet summit in Washington just as he and Congress were locked in an embarrassing showdown over U.S. compliance with earlier arms agreements, including issues such as "Star Wars" missile defenses that are likely to surface in his talks with Gorbachev.

"They did not want to have fights going on with Congress while the Soviets were in town to negotiate," said House Armed Services Committee Chairman Les Aspin (D-Wis.).

In what lawmakers believe was largely a result of the impending summit, national security adviser Frank C. Carlucci began working quietly with congressional negotiators to produce a defense authorization bill that gives Congress the weapons constraints it wants without tying Reagan's hands in his talks with Gorbachev.

Just as the budget and arms-control efforts were getting under way, Reagan turned out to be prophetic in having suggested that his second Supreme Court nominee would be as objectionable as the first. Douglas H. Ginsburg, choice No. 2, withdrew after acknowledging he had smoked marijuana as a student and law professor in the 1960s and 1970s, succumbing to conservative as well as liberal objections.

Faced with "three-strikes-and-you're-out" warnings from Democrats, Reagan then turned to Anthony M. Kennedy, a moderately conservative federal appeals court judge from California who Democrats had earlier indicated would be acceptable.

The emerging arms-control accord illustrates the limits as well as opportunities posed by the impending agreements.

By blocking further strategic weapons deployments that exceed limits of the unratified 1979 SALT II treaty and precluding Strategic Defense Initiative (SDI) tests that go beyond a narrow interpretation of the 1972 Antiballistic Missile (ABM) Treaty, Congress will probably have prevented Reagan from what it regards as backtracking on existing arms agreements.

But it will have left most of the basic issues, including the critical question of ABM interpretation, to be resolved later, possibly in another battle amid next year's presidential and congressional election campaigns. Moreover, if the U.S.-Soviet negotiations falter, Reagan could come back to Congress with what might well be a stronger hand to demand a lifting of the arms constraints.

Congress had to take half a loaf on arms control because of veto politics: Reagan had threatened to veto the defense bill if the arms provisions were included, and arms-control forces in Congress did not have the two-thirds majority of both houses necessary to override.

Congress could have pressed the issue in connection with "must" legislation to fund the government after current stopgap funding runs out Dec. 16. But it could have wound up in the unenviable position of shutting down the government in a dispute over two old arms-control agreements just as Reagan is trumpeting a new agreement with Gorbachev, with promises for more in the future. And it still would not have had a defense authorization bill.