* Stocks slide as China allows yuan to fall for 2nd day
* Gold has rebounded over 3 pct from July's multi-year low (Updates prices, adds comment)
By Marcy Nicholson and Clara Denina
NEW YORK/LONDON, Aug 12 (Reuters) - Gold rose for a fifth session in a row on Wednesday, hitting a fresh three-week high as the dollar and global equities slid on concerns over China's devaluation of its currency.
Earlier in the day, the People's Bank of China set the yuan's midpoint reference rate weaker than Tuesday's surprise 2 percent devaluation.
The move sparked fears of a currency war and hit global equities, prompting some investors to seek assets perceived as safer such as gold. The metal has now recovered more than 4 percent from a 5-1/2-year low of $1,077 hit during a late-July rout.
Spot gold rose as much as 1.2 percent to its highest since July 20 at $1,121.40 an ounce and was up 0.9 percent at $1,119.10 by 1413 GMT.
U.S. gold for December delivery gained 1.4 percent to settle at $1,123.60 an ounce.
"The bears have been running the show now for some time and that devaluation (on Tuesday) was a bit of a bash in the eye for the bears... but we haven't seen any strong fresh buying, it is more a short-covering rally," bullion broker Sharps Pixley chief Ross Norman said.
Gold was lifted by a weaker dollar, down 1.1 percent against a basket of currencies, and lower U.S. Treasury yields on doubts over whether the U.S. Federal Reserve will raise interest rates following China's devaluation.
"It's benefiting gold the most as major currency debasement should and would expect gold to test key resistance at $1,130," said Tai Wong, director of base and precious metals trading for BMO Capital Markets, referring to the yuan devaluation.
"It's unclear how much more yuan devaluation we will see so gold sellers are likely to hold fire at the moment."
The weaker yuan would make it more expensive for China, the world's top consumer, to import gold, said OCBC Bank analyst Barnabas Gan.
"The potential for the monetary authorities to further devalue the currency may raise fears of inflation and may raise more general concerns about official intervention in financial markets," said David Jollie, head of research for Mitsui and Co Precious Metals, in a note.
"This could bring forward some customer purchasing of jewelry or other expensive items, potentially boosting demand for gold and platinum in particular."
Spot silver rose to a one-month high of $15.58 an ounce. Platinum was up 1 percent at $993.50 an ounce and palladium climbed 3.2 percent to $621.25. (Additional reporting by Manolo Serapio Jr in Manila; Editing by William Hardy and Meredith Mazzilli)