Gold extended gains in Europe on Friday as weaker-than-expected U.S. retail sales data brought risk aversion back to the market, pressuring stocks and the euro and boosting interest in bullion as a safe haven.

But the metal is struggling to make significant headway after hitting a record $1,251.20 an ounce earlier this week, having fallen 1 percent on Thursday as risk appetite recovered and investors worried the market had become overstretched.

Spot gold was bid at $1,225.25 an ounce at 1248 GMT, against $1,215.80 late in New York on Thursday. U.S. gold futures for August delivery rose $4.70 to $1,227.00.

The retail sales numbers out of the U.S. aren't really supportive for the recovery, but I don't think they're necessarily bad enough to warrant a rush back into gold, said RBS Global Banking & Markets analyst Daniel Major.

I think gold is going to struggle, provided we don't get another bout of extreme risk aversion.

The euro turned lower on Friday after data showed a surprise decline in U.S. retail sales in May, sparking concern about the strength of the U.S. economic recovery. The Commerce Department said total retail sales fell 1.2 percent.

Europe's top shares turned negative after the data, which has returned the focus to concerns about economic growth. U.S. stock index futures also fell. .EU .N

Sharp falls in equity values and the euro this year had benefited gold as an alternative asset.

Demand for gold as a safe haven and an alternative currency remains, though maybe not in the heightened way it was a few weeks ago, said Credit Agricole analyst Robin Bhar.

Oil prices also extended losses after the data, dropping more than $1 a barrel.

Investment demand continued to be strong, with holdings of the world's largest gold-backed exchange-traded fund, New York's SPDR Gold Trust, rising 7.6 tons to a record 1,306.137 tons on Thursday.

OPPORTUNITY TO BUY

This trend shows that medium to long-term investors see further risks on the horizon and view the lower gold price as an opportunity to buy, said Commerzbank in a note.

However Indian gold buying remained weak for a fourth day as traders sought lower prices, though a stronger rupee helped make the dollar-quoted asset cheaper for local buyers, dealers said. India is the world's biggest gold consumer.

From a technical perspective, gold's consolidation is likely to set it up for fresh gains in the medium term, analysts said.

Despite the recent weakness, we continue to see pullbacks as counter trend and temporary ahead of a resumption of the larger bulltrend, said Barclays Capital in a note.

Silver was at $18.43 an ounce versus $18.19, platinum at $1,537.50 an ounce versus $1,534, and palladium at $447.50 against $450.50.

Other precious metals have started to outperform gold with the gold to silver ratio tumbling below 68 having made highs near 70 earlier this week, said VTB Capital analyst Andrey Kryuchenkov. The platinum to gold ratio nudged to 1.25.

(Editing by Sue Thomas)