Gold prices showed just how maniacal they could be yesterday, soaring a record $25 to $440 an ounce early in the day, then tumbling as low as $405, and finally ending in New York slightly below the previous day's close.

The wild price fluctuations, coming on top of an already astounding few months of price surges, left bullion dealers and analysts dizzy. One termed the market's roller-coaster performance "sheer madness." Another in New York exclaimed, "The market's gone bananas."

High gold prices have been taken as a fever indicator of public anxieties over a host of world problems, including inflation, unemployment, recession and political instability. The gold rush also has been spurred by a shortage this year in the availability of the precious metal.

Dollar prices, too, moved frenetically yesterday, slumping to a new low against the West German mark before rallying sharply. The rally was sparked by rumors of an imminent, massive support package being readied by the U.S. Federal Reserve Bank.

Speculation about a possible U.S. intervention heightened with Federal Reserve Chairman Paul A. Volcker left a meeting of world monetary officials in Belgrade to return to Washington.

Other senior U.S. monetary officials declined to attach much importance to Volcker's unexpected return and played down the prospect of a new dollar rescue package to replace the $30 billion plan announced last Nov. 1.

But expectations of a U.S. move in the offing created turmoil and confusion on international financial markets during much of the day. Unless some kind of restructured support operation is announced, financial experts predicted further widespread dollar selling and yet another round of gains in the price of gold.

The sharp rise in bullion prices already has defied the experts and, seemingly, the monetary laws of gravity. From a fixed price of $35 an ounce eight years ago, gold reached $200 an ounce in July 1978, soared above $300 for the first time less than three months ago, and topped $400 for the first time on Monday. It closed yesterday in London at $424 and in New York at $413.50. Dealers reported the mood was still bullish and a further jump to $500 was not ruled out.

The behavior of the bullion market in recent days clearly has left world monetary officials worried. U.S. Treasury Under Secretary Anthony Solomon yesterday termed the volatile rises "unhealthy."

Such concern is appropriate, for the heightened level of gold fever carries a grim warning for Western governments to get inflation under control or risk loss of confidence in their economies.

For a time this year, the gold boom seemed to be feeding on paper currencies other than the dollar. The price of bullion rose while the value of the dollar managed to hold steady or even inch up slightly.

But the latest surge in gold appears to be propelled both by its own momentum and by pushing off against the dollar.

Confidence in the dollar received a further blow this week when world financial officials meeting in Belgrade failed to reach agreement on an International Monetary Fund scheme to sop up excess dollars other countries wish to sell.

Ironically, much recent news should have favored a stronger dollar. The United States abruptly tightened interest rates, the American balance of payments deficit generally has shown a narrowing trend, and the Federal Reserve and other central banks have continued to intervene in the currency markets to support the dollar whenever it weakened.

The dollar yesterday, for instance, was able to recover well on world markets thanks to support from central banks, particularly the West German Bundesbank, which again took in over $250 million for the second day running.

Clearly anxious over the increasing pressure the dollar has come under, however, U.S. monetary officials hinted that they might try to soak up additional dollars by issuing bonds in West German and Swiss currencies. There was also a suggestion of increased American gold sales to help ease the gold panic.

Recent official gold auctions by the U.S. Treasury and the International Monetary Fund have at the same time contributed to the latest panic, providing wealthy investors with a convenient vehicle for entering the gold market. The proliferation of government-backed coins has given small investors access to gold ownership as well. In addition, the development of futures contract trading in New York and Chicago has added a highly speculative element to the mix.