Election of Socialist Francois Mitterand to the French presidency resulted in a panicky flight from the French franc into the U.S. dollar and gold yesterday as jittery investors attempted to evaluate the end of 23 years of right-center government in France.

The French stock market cracked wide open in what French Bourse officials termed Black Monday, one of the most disastrous days since World War II for the 190-year-old trading center. Meanwhile, the U.S. dollar made spectacular gains in all foreign currency markets, while gold shot up over the $500 mark for the first time in some weeks before retreating at the end of the day.

Gold briefly touched $509 in response to the turbulence in currency markets, but it fell back sharply in U.S. trading, United Press International reported.

In Zurich, it closed at $493 an ounce, up $7.50 from Friday's close. In London the close was $491.50, up $3 from its weekend close.

[In New York, however, gold fell to $484 an ounce from Friday's $491. The Commodity Exchange settlement price was $483.50, down from $491.50. Silver eased to $11.17 an ounce from $11.48, and it settled on the Comex at $11.175, down from $11.475, UPI said.]

It was a day of such jumpy nerves that at another time, with an American administration of different philosophical persuasion in power, the U.S. conceivably might have joined in a sympathetic move with the French to support the franc and to keep the dollar from soaring out of sight.

The dollar scored these gains in Europe, compared with Friday: to 2.2803 marks from 2.2515, to 2.0735 Swiss francs from 2.0545, to 5.49375 French francs from 5.3325, to 2.5390 guilders from 2.5070 and to 1,134.25 lire from 1,120.00. In London, where the pound just a few weeks back was worth $2.30 or more, it dropped to $2.10545 from Friday's $2.11575.

But in a telephone interview yesterday, Beryl Sprinkel, Treasury undersecretary for monetary affairs, stressed that "there has been no intervention from our side." Sprinkel -- who just last week formally announced that the Reagan administration's policy is not to intervene in foreign exchange markets except in emergencies -- described the foreign exchange changes yesterday as "minimal".

He added that no one knows all the reasons for shifts in markets, "and it's not my intention to impose my ignorance on the marketplace".

Sprinkel said he could not be sure what the Carter administration would have done yesterday in terms of market intervention. "But in the past their intervention was massive. I know some of them object to the term, but we're not going to do anything like that," Sprinkel said.

In Paris, trading in French securities came to a halt when sales orders piled up and buyers -- notably institutional investors -- disappeared. Under French Bourse rules, trading must be suspended when share prices drop by 8 percent. According to market analysts on the scene, shares of some of the nine big industrial and financial groups that Mitterand has promised to nationalize would have plunged 20 percent or more if trading had not been halted.

As panic mounted inside the stately, white stone Brogniat Palace housing the Bourse, clusters of Mitterand supporters outside the edifice continued their celebration.

In French froeign exchange trading, the collapse of the franc against the dollar touched off a series of moves by the soon-to-be-ousted French government to stabilize their currency. The Banque de France intervened in the foreign exchange markets to slow the erosion of French money, and also boosted their seven-day Treasury bill rate by the extraordinary amount of 2 1/2 points to 16 percent.

Under orders from Prime Minister Raymond Barre, the government also acted to prevent illegal movements of French assets abroad. The French customs service issued orders to all frontier posts and airport installations to tighten measures to halt the flight of capital from the country. Travelers have the right to take only 5,000 francs -- now less than $1,000 -- out of the country on any single trip.