The dollar fell in hectic foreign exchange trading at home and abroad yesterday after President Carter's decision to freeze Iranian deposits in U.S. banks in response to Iran's plan to withdraw the money.

The price of gold, which usually rises when the dollar weakens because of the metals role as a hedge against monetary uncertainty, rose only slightly in New York and Europe.

Gold closed at $390 a troy ounce in both London and Zurich, up from $386.75 in London Tuesday and $387 in Zurich. In New York, it rose to $388 an ounce from $384 Tuesday.

Here are prices for the dollar in Europe compared with late prices Tuesday: Frankfurt -- 1.7822 marks, down from 1.7970; Zurich -- 1.6525 Swiss francs, down from 1.6625 Tuesday; Paris -- 4.1837 French francs, down from 4.21; Amsterdam -- 1.9838 guilders, down from 1.9960; Milan -- 827.90 lire, down from 832.50.

In London, the cost of a British pound rose to $2.1095 from $2.1039. In New York, the pound closed at $2.1165, up from $2.1065. In Tokyo, where the market closed before the Iranian announcement was made, the dollar closed at 245.975 yen, down from 246.75.

Prices in New York, as of 4 p.m. compared with Tuesday's late prices: Marks -- 1.7770, down from 1.7955; French francs -- 4.1640, down from 4.2080; Swiss francs -- 1.6415, down from 1.6615; Yen -- 244.40, down from 247.00; Canadian dollar -- 1.1852, up from 1.836.