The price of gold reached the $400 barrier today and continued to climb, closing at a record $417.50 an ounce in New York and at $414.25 in London.

The near-panic that has permeated the gold market for more than two months continued to spill over into other metal markets today, as it did last week. Silver, platinum, copper, lead and zinc prices all rose sharply.

As usual, while the price of gold was rising today, the price of the dollar on the world's foreign exchange markets was falling.

In Frankfurt, the dollar declined to 1.7365 West German marks at the afternoon fixing, its second lowest level in history. The dollar did recover slightly near the close of trading.

The sharp decline in the dollar came despite massive intervention by the West German central bank, the Bundesbank, which purchased between $250 million and $350 million to keep up demand for the U. S. currency, analysts said.

Central banks in other major European countries such as France and Switzerland, also intervened in their foreign exchange markets to support the dollar. But, as in West Germany, the amount of intervention was insufficient to half the dollar's decline.

Analysts said world currency traders were nervous because the U. S. and West Germany made no announcements about the dollar after a meeting Saturday among Federal Reserve Board Chairman Paul Volcker, Treasury Secretary G. William Miller, West German Chancellor Helmut Schmidt, West German finance minister Hans Matthoefer and Bundesbank President Otmar Emminger.

The dollar did, however, gain against the British pound. On Friday, a pound was worth $2.2025; today it was worth $2.1935. The pound did well last week because of rumors that petroleum-producing contries were going to raise oil prices and set up a payment system that was not in dollars only but geared to a basket of currencies.

Britain, because of its North Sea finds, will be nearly self-sufficient in oil.

According to Leslie Deak, vice president of Deak, Perrara, the price of gold closed at $417.50 an ounce in cash trading in New York, up from $395.50 last Friday. Silver, which cost $16.40 an ounce last Friday, cost $18.25 today, Deak said.

The continuing run-up in the price of gold, which has climbed more than $100 an ounce since late July, "is totally senseless, unbelievable," said one gold trader.

The day for gold began calmly enough in London, where the price declined slightly in early trading to about $397.75 an ounce from Friday's close of $398.

Then the price turned around and rose through the rest of trading in London and on to the major U. S. markets in New York and Chicago.

Gold finished in London at $414.25 an ounce, dealers said.

In foreign exchange trading, the dollar declined in Zurich to 1.5493 Swiss francs from 1.55525 on Friday. In Paris, the dollar was worth 4.08125 French francs, compared with 4.10 on Friday. The dollar also declined in Amsterdam and Italy, although it was unchanged in Belgium.