Gold futures closed higher on Wednesday after dropping gains in two earlier sessions as the dollar dropped after Federal Reserve Chairman Ben Bernanke said the U.S. economy may shrink over the first half of this year, which would signal the start of a recession.

Gold for June delivery added $12.40, or 1.4 percent, to finish at $900.20 an ounce on the Comex division on the New York Mercantile Exchange. During earlier intra-day trading, gold hit a high of $903 an ounce.

It now appears likely that gross domestic product (GDP) will not grow much, if at all, over the first half of 2008 and could even contract slightly, Bernanke told lawmakers.

The dollar index, which tracks the performance of the U.S. currency against a basket of major currencies, was recently down 0.25 percent at 72.33.

In the previous trading session, gold futures took a dive, loosing $33.70 to close at $887.80 an ounce, adding to a loss of $15 on Monday.

Given the need to generate cash and the apparent increase in risk appetite, it looks as if the precious [metals] complex will remain vulnerable to further bouts of selling pressure in the short term and could see gold test the psychologically important $850 level, James Moore, a analyst, said in a research note.