There is a high prospect that the principal foreign policy gains achieved at such great cost in the past five years -- relative stability in East-West relations and the brightest prospect for arms control in the post-war period -- may be lost in the next six months, unless a note of rationality is introduced into the Gramm-Rudman gridlock that now grips Washington.

That dour prediction derives from the likelihood that defense spending will be made the scapegoat for budget deficits. Few people have thought much about the significance of linking defense spending to the deficit as distinct from linking it to the threat to which it is meant to respond. During the debate prior to the enactment of Gramm-Rudman, no one had the temerity to urge that a message be sent to Mr. Gorbachev noting that, because of short-term fiscal imbalances, we were going to bill the Pentagon for 50 percent of the ultimate shortfall and so would appreciate his reducing the threat by a corresponding amount.

The deficit must be reduced, and promptly. This is as important to our national security as it is to our economic and social well-being. But if the budget-balancing effort is hinged disproportionately to reductions in defense spending, we will suffer enormously from slow disintegration of the Geneva talks and from the resurgence of Soviet efforts to expand beyond their borders. The mood seems to be that the national priority is to cut the budget deficit, and to worry about defending the country later. Unfortunately, that is clearly intolerable in the missile age.

But for those who are interested in salvaging what has been built in the past five years, it does no good to curse misguided legislators. To maintain a solid negotiating position in Geneva and to avoid draconian cuts in defense, it is essential to address the criticisms being used to justify the attack on defense.

First, there is the understandable belief that the threat indeed has diminished, that the buildup of the past five years has worked, that the Russians are being deterred and that, consequently, we ought to be able to slow down a bit. After all, didn't the president point out that "not one square inch of territory has been lost" during this time? In fact, our success in deterring the Soviets from undertaking more Afghanistans has depended less on our hardware than on Soviet confidence that the man in the White House would use it.

But deterrence is the product of capability as well as will, and on the capability side, the Soviets have been improving at a greater rate than we. In the past five years, notwithstanding what we have built, the Soviet Union has produced twice as many fighter aircraft as the United States and her NATO allies, four times as many helicopters, five times as many artillery pieces, 12 times as many ballistic missiles, 50 times as many bombers. In short, the threat is not diminishing. It is getting more severe.

A second criticism asserts that regardless of the threat, there is simply a limit to how much we can spend. This school of thought starts from the premise that we are spending more on defense than ever before. That's untrue. We could add $100 billion to the president's defense budget submitted last week and still not reach the proportional amount we were spending in the mid-'60s (without even counting Vietnam), not to mention the far greater amounts spent in the '50s, when, of course, the threat was much lower. In the '50s we spent 10 percent of GNP on defense, in the '60s about 8.5 percent and by the end of the '70s about 5 percent. Today we spend about 7 percent.

It isn't difficult to recall the pattern of Soviet behavior associated with those low moments of the late '70s. From 1975 to 1980 Moscow expanded its influence into Angola, Ethiopia, South Yemen, Indochina, Afghanistan and Nicaragua. In spite of our recent success in checking this advance, if we again lower our guard, we can expect Soviet willingness to take risks to rise again. The lesson of this is that it takes about 7 to 8 percent of GNP to deter the Soviets. By historical standards that is not a very high price to pay.

A third criticism asserts that it is unwise to give the Defense Department more money because it will be wasted. This line of attack has emerged from the well- publicized exposures of overpricing. But even in those cases where lapses occurred, the total waste is measured only in the tens of millions of dollars. The backlash -- in the form of program stretch-outs inspired by these stories -- could easily add an extra $10 billion in costs within a couple of years. But let's not be too subtle. The object of those who criticize outrageously priced wrenches is not just to correct mismanagement, it is an attack on the restoration of our strength.

Finally, there is the comment by a number of the more responsible congressional critics that the process of developing strategy and buying hardware to carry it out lacks coherence. Some say that there is no system at all and that the services are basically given a share of the pie and allowed to go buy what they will -- a process that, it is said, leads to waste, redundancy and, worse, to forces inadequate to carry out a sensible strategy.

It is time for Congress and the executive branch to forge a new consensus on a minimum investment for defense. Each side must give a little.

The executive branch should renew and use the original planning, programming and budgeting system of 1982. This process took the president's goals, examined them in light of the threat and defined alternative strategies for achieving them at various levels of risk. When a strategy was finally chosen, it was translated into force structure, and procurement of the necessary hardware was set in motion.

As for Congress, it should drop the pretense that it understands how to manage defense programs. Moreoever, once it has reviewed the administration's five-year program, it should approve the entire plan, rather than conduct the annual overhauls that now add so much to the cost of programs -- if not for five years, then at least for two. Such a change would save tens of billions of dollars and would add stability to planning, both in the Pentagon and by defense contractors.

Meanwhile, we need to stand back and ask what the effect of our defense program will be on the Soviet Union's spending in terms both of cost and of the character of threat it evokes. We must emphasize things that we do relatively better than the Soviets. We cannot compete with them in turning out tanks, artillery weapons or even ICBMs. But we do have a comparative advantage in high technology, and we should concentrate investment in that area.

We should also focus our research and development in areas that will evoke a Soviet response that is relatively benign. The classic case is that of our emphasis on the strategic bombers in the 1950s, which led the Kremlin to divert tens of billions of rubles into building air defense missiles, none of which threatens the United States. Our Stealth systems and aspects of our Strategic Defense Initiative could have a similar effect.

We can spend tax dollars thoughtfully and deter conflict at a reasonable cost. But we cannot "de-link" defense from the Soviet threat or ignore the relationship between the defense program and arms control. Otherwise any hope of negotiating arms reductions will disappear, for we will have disarmed ourselves, and the Russians will no longer have any incentive to make concessions. Over time, as the power balance tips further in their favor, they will once again become more willing to take risks. We will have reinvented the dangerous situation we faced in the late 1970s.