The price of gold briefly climbed above $400 an ounce in trading here today, then fell back to close at $399.

The speculative fever that pushed the price of gold up $18.60 an ounce on the New York Commodity Exchange was felt in other metals markets as well. Silver, copper and platinum prices also soared.

At the same time that investors were pushing up metal prices, they were selling dollars. The price of the U.S. dollar fell in European trading, with most currency traders buying West German marks and Swiss francs.

Analysts attributed both the heavy dollar selling and the jump in metals prices to fears among investors that the major petroleum exporting nations planned increases in crude oil prices.

There also were rumors that the oil producers are going to announce a plan that would reduce the role of the dollar in international oil trade. Now most nations pay in dollars for the petroleum they buy, but oil exporting nations are thought to be upset because the value of the dollar continues to decline.

Many investors, especially those from the Middle East and the Far East, have been buying gold heavily for the last several months, looking to it as a haven from the dollar and a hedge against inflation.

Only two months ago, gold was selling for less than $300 an ounce.

The sharp rise in gold prices today was due in part to the small number of buyers and sellers of the metal.

"Our offices did not report that many orders," said Leslie Deak, vice president of Deak-Perera. "The market was very thin. In a thin market, any surge in demand will push the price way up."

Although trading was thin, the price continued to move up all day from the time the sun rose on the European market until it set on the United States market.

Gold closed at $377 an ounce in London Wednesday, and hours later closed at $380.40 in New York. When London trading opened this morning, the price moved to $383.25 and by the close of trading hit $395.50 an ounce.

Meanwhile, the price of silver closed at $16.45 an ounce, up 75 cents an ounce, while copper closed at $1.095 a pound, up two-and-a-half cents. On Wednesday copper prices jumped 9.35 cents a pound.

Some analysts speculated that investors who made heavy profits in copper trading early this week took those profits and put them back into the precious metals today.

Silver prices had declined sharply early this week, when copper prices were climbing.

The dollar, meanwhile, came near the record lows it hit in Europe last October, just before President Carter launched his major dollar rescue operation on Nov. 1, 1978.

New York analysts said both the Swiss and West German central bank intervened heavily in foreign exchange trading in their countries to keep the dollar from falling further. When central banks intervene in a market, they buy dollars with their currencies thereby increasing demand for the U.S. currency.

The dollar closed at 1.7455 marks in West Germany, near the low of 1.72 marks reached last Oct. 30. In New York the dollar fell further and was worth about 1.737 marks at the close of trading.

Meanwhile, Great Britain with its large oil reserves, did well on a day when worries about petroleum dominated trading. The pound rose to $2.2042 in London, up from $2.1855 on Wednesday.