Panicky investors fled to gold today, driving its price up here $42.50 an ounce to $575.50, a record.

In Paris, gold reached $581; then trading was halted for lack of anyone willing to sell.

Analysts said investors were freshly fearful about the Soviet incursion into Afghanistan and the possibility the fighting there could spread elsewhere in the unstable Middle East.

[In Hong Kong Thursday, Reuter news service reported that the price of gold burst through the $600-an-ounce barrier for the first time on the Hong Kong bullion market. Within the first 2 1/2 hours of trading, the asking price zoomed from $588 to $617 before easing fractionally to $615. But virtually no transactions were recorded, and dealers said the price was being pushed up by sellers holding stocks. Gold opened at $12 above the closing price Wednesday in New York.]

Buyers also turned to other precious metals; silver jumped $4.40 an ounce to $38.85. The dollar, meanwhile, fell in foreign exchange markets against most other major currencies. Stock prices also fell; the Dow Jones industrial average declined 14.17 points to 824.57.

On the New York Commodity Exchange, traders reported almost no one was willing to sell the metal while willing buyers were legion.

"There's no haggling about price at all. The market is moving whenever there's an offer [to sell]," said Leslie Deak, vice president of Deak-Perera.

The New York and Paris prices were about matched in London, where gold was quoted at $570 an ounce in late trading.

Throughout history, gold has been regarded as a refuge by investors and it plainly still is, even though its formal international monetary role has diminished.

While the fighting in Afghansitan has apparently triggered the latest surge in gold prices, it is only the latest in a series of political and economic developments that have raised the price of the metal from $230 an ounce a year ago.

The Iranian revolution and the continuing strength of the fundamentalist Moslem movement are said to have caused concern among royalty and wealthy industrialists in many of the Middle Eastern countries -- Saudi Arabia, for example -- about the stability of their own regimes. Wealthy Middle East investors have been transferring their wealth into safe assets such as good, according to Andre Sharon of the brokerage firm, Drexel, Burnham, Lambert Inc. "They buy gold bullion because it's anonymous," Sharon said.

In Saudi Arabia -- where the distinction between official government reserves and private weath is unclear -- monetary reserves have declined $3 billion in the last two years, despite massive oil revenues. Analysts think the decline reflects the transfer of assets out of the country by jittery members of the royal family, although the Saudis deny this.

Continuing high inflation in the United States and elsewhere has made investment in "paper" assets such as stocks and bonds, as well as currencies, unattractive.

Although the dollar has weakened recently, most of the sharp increase in the price of gold in the last six months occurred at a time when the dollar was getting stronger. In the past, when gold prices rose, the dollar fell.

"It's no longer a question of investors getting out of the dollar," said one trader. "With the world in turmoil, they're getting out of all paper and into gold, whatever its price."

Federal Reserve Board Chairman Paul A. Volcker, in a speech to the world gold market its caught up in a speculative fever all its own. "Quite obviously it has all the potential characteristics, I suppose, of a classic speculative boom-and-bust situation," he said.

The increase in the price of silver has been even more dizzying than gold. In the last month, silver prices have more than doubled, from less than $19 an ounce on Dec 7 (and $6 an ounce a year ago) to $38.85 today.

Many analysts are becoming convinced that silver prices are being manipulated by a small group of operators who have cornered the market. Similar charges have been leveled in the past.

In any event, demand for gold and silver has risen so fast that the cash price -- the price paid for gold ordered for today's delivery -- has exceeded the so-called futures price -- the price paid for gold to be delivered at some point in the future.

Usually futures prices are higher. But exchanges have limits on how fast the price of gold (or other commodities) futures can rise in one day.

Gold futures prices went up the $25 limit today, while cash gold rose $42.50.

In the foreign exchange markets, the dollar fell, although traders cautioned that the first day of trading in a new year often is not a good indication of future trends, because buyers and sellers of foreign currencies might be trading to satisfy technical requirements -- such as taxes.

In West Germany, despite several interventions by the Bundesbank to prop up the dollar, the U.S. currency closed at 1.7130 marks, down from 1.7245. The British pound rose to $2.2395 from $2.22175 and the dollar declined against the Swiss franc (1.5770 from 1.5925) and the Japanese yen (238.35 from 240).