Gold set a record price for the second day in a row Wednesday, as investors reacted to concerns over the euro zone debt crisis. Adding to the pressure on the precious metal’s price was the news that several nations’ central banks had also bought gold.

Reuters reported that growing worries over the fragility of the Italian and Spanish economies, coupled with fears that the U.S. might default, had driven the metal higher in recent weeks. The trend continued despite the debt deal in the U.S. as Italy took center stage for its own debt woes. Investors also have lingering concerns over how ratings agencies might handle the triple-A rating of U.S. debt.

In European trading, spot gold had been quoted at $1,667.49 per ounce, which was up 0.4% for the day so far. It had hit a record $1,672.65 earlier. U.S. gold futures also saw an increase increase of 1.4%, coming in at $1,665.50 per ounce.

News from the International Monetary Fund (IMF) that a number of central banks, including those of Russia, South Korea, Thailand and Kazakhstan, had also bought gold in June showed that governments were solidifying reserves in bullion instead of in currencies.

For Thailand it was the third time in the past year; it added 18.66 tons in June for a total of 127.524 tons. Earlier in the week South Korea had said it bought gold for the first time in more than 10 years in both June and July.

With demand so strong, gold looks to be in line to gain 17% in 2011; that would mark the 11th straight year of increases. This quarter could be its strongest quarterly performance since Q2 2010. ETF gold holdings also rose, for the eighth straight day, with the SPDR Gold Trust showing an inflow of more than a half million ounces. That is the first time this year it has shown a net inflow.

UBS strategist Edel Tully said in a note, “The lack of a decent gold pullback has left many investors feeling frustrated and patience for a better buying opportunity is now wearing quite thin, which is why gold has attracted very decent buying this week.”

She also said that the size of the speculative position in U.S. gold futures posed a downside risk to gold, adding, “But given that these are not ordinary times, ordinary rules do not apply.” Tully also indicated that UBS has raised its three-month price forecast from $1,600 to $1,850.