Gold prices rose 1.5 percent near a closely watched level Tuesday to a three-week high as the dollar weakened and stocks rallied.

The yellow metal also gained from a lack of speculative long or optimistic bets, leaving prices with significant upside potential.

The most actively traded gold contract on the Comex rose $23.40 to settle at $1,631.50, while spot gold climbed $20.49 to $1,631.84.

The dollar fell against a basket of major currencies 0.28 percent to 81.16.

The dollar is selling off, benefiting gold and commodities, Scott Gardner, the chief investment officer at Verdmont Capital SA in Panama, told Bloomberg. Risky assets have been well bid in 2012 on the heels of relatively solid economic news in the U.S. and the belief that much of the bad news out of Europe has been priced in.

European stocks soared. Britain's FTSE 100 gained 1.5 percent, Germany's DAX ended 1.7 percent higher and France's CAC 40 index jumped 2.7 percent.

In late afternoon trading, U.S. stocks were higher, with all major indexes well into positive territory.

The equities rally rather than gold's safe-haven appeal accounted for much of the yellow metal's gains.

It's not so much investors are buying gold because the world is falling apart. It's just another place to for people make money, Rick Bensignor, chief market strategist Merlin Securities, told Reuters.

Gold prices also benefited from increased Indian buying ahead of the nation's wedding season.

Despite the day's gains, gold did not settle above its 200-day moving average of $1,631.70, which would have been a clear signal to traders that the metal was in a sustainable rally.

Silver gained more, on a percentage basis, than gold. The most actively traded silver contract on the Comex soared $1.11 -- or 3.86 percent -- to close at $29.89, while spot silver was up 93 cents to 29.97

Shares of silver mining stocks also rose. Fresnillo Plc surged 4.1 percent, Silver Wheaton Corp. climbed 3.8 percent and Coeur d'Alene Mines Corp. was up 4.9 percent in late afternoon trading.