A budget headache that first made the president's economic advisers look dizzy has now sickened his men at the Pentagon and in the Congress. The only way back to health is along the painful path of cuts in defense and domestic speding. The hope is that in the process, President Reagan will learn how he allowed a headache to become a contagious disease.

The original Reagan economic proposals provided for a budget that moved from an estimated $41 billion deficit in fiscal 1982, beginning next month, to a slight surplus in 1984. There were also to be cuts in social spending and in the money supply, a big tax reduction and a major defense buildup. The theory behind these proposals was that cuts in social spending and the money supply would break the inflationary expectations of the financial community. The tax cut would stimulate more business activity and speed economic growth. The growth would yield larger revenues to cover higher defense spending and the deficit.

Instead, cuts in the money supply kept interest rates high. The high rates both slowed economic growth, producing lower tax revenues, and increased the cost of servicing the government debt. Lower revenues and higher outlays inevitably combined to raise budget deficits.

Now must projections point to a deficit that will rise to $60 billion in 1982, and perhaps $100 billion in 1984. Deficits of that magnitude require the government to borrow in a big way. The prospect of heavy borrowing by the Treasury forces rates up, which in turn maintains the cycle of slow growth, high debt and big deficits.

The obvious way to break the cycle is to make spending cuts that would put the budget back on the path to balance. Economic activity will slow as a result of the cuts. Business demand for loans would drop, pushing down interest rates. The lower rates would make possible business expansion and an eventual progress toward prosperity.

Following that track is not easy for the Reagan administration in the best of circumstances. Some cuts have to be made in projected spending on defense, which the president promised would be substantially increased. Others have to be made in domestic spending -- including Medicare and Social Security, eventually -- which the president originally exempted as part of a "safety net." But what was hard to start with has been made more difficult by leading Republicans in the Defense Department and the Congress.

Secretary of Defense Caspar Weinberger has never spelled out in public a sharply degined strategy that asserts the administration's defense priorities in sequential order. He has given the impression that, as he put it in a speech on July 20, "we found that there was literally nothing that we did not need."

But if that is the case, there is no way of making visible even a finely targeted reduction in those parts of the defense program that provide costly answers for highly unlikely contingencies. Any cut looks like a total retreat -- a "Dunkirk," as former defense secretary James Schlesinger put it the other day.

Senate Majority Leader Howard Baker and House Minority Leader Robert Michel entered the picture when the Congress returned from vacation Wednesday. Both men used the occasion to blame the administration budget difficulties on the financial community. They threatened punitive actions -- such as rationing if interest rates did not come down pronto.

But nobody believes any Republican administration would attack such loyal supporters as the banks, the insurance companies and the pension funds. So the threats merely confirm a suspicion that may be the administration just doesn't know what it is doing in economic policy. That makes it all the more necessary for the president to prove his solid good sense by making more budget cuts.

Whether Reagan can now cut enough from defense and other spending to put the budget back on track toward balance is not at all clear. The president started very late. He is meeting resistance in the Defense Department, which has tribunes among Republicans in the Congress. The Democrats -- sparked by labor and the minorities -- are bound to attack the cutting operation with fury.

If the president fails to hit the budget target, his stock in the country may drop rapidly. Even if he hits it, the most likely tangible reward will be a slow progress toward modest prosperity -- say, in 1983. The big bonus would be what goes on in the president's mind. By cutting the deficits to improve the economy, Reagan will be ignoring in practice the supply-siders and monetarists who preach that deficits don't matter. He will thus be in position to cut loose from the ideologues who have imprisoned his administration in "voodoo economics."