* Biden says Russia has failed to split G7
* Biden condemns 'barbarism' as missiles strike Kyiv
* Gold ban targets 'Putin's war machine', says British PM
* Oil import price cap also being discussed, says German source (Adds biofuel waiver division, oil cap debate, NGO demands)
By Andrea Shalal and Andreas Rinke
SCHLOSS ELMAU, Germany, June 26 (Reuters) - U.S. President Joe Biden told allies "we have to stay together" against Russia on Sunday as G7 leaders gathered for a summit set to be dominated by war in Ukraine and its impact on food and energy supplies and the global economy.
At the start of the meeting in the Bavarian Alps, four of the Group of Seven rich nations moved to ban imports of Russian gold to tighten the sanctions squeeze on Moscow and cut off its means of financing the invasion of Ukraine.
However, it was not immediately clear whether there was consensus on the move, with European Council President Charles Michel saying the issue would need to be handled carefully.
Germany also expected its proposal for a temporary waiver on biofuel mandates, designed to combat soaring food prices, would fail to secure G7 backing due to U.S. and Canadian resistance.
Western countries rallied around Kyiv when Russia invaded Ukraine in February, but more than four months into the war, that unity is being tested as soaring inflation and energy shortages rebound on their own citizens.
Chided by Ukraine for not going far enough to punish Russia, G7 leaders were also having "really constructive" talks on a possible price cap on Russian oil, a German government source said.
At the start of a bilateral meeting, Biden thanked German Chancellor Olaf Scholz for showing leadership on Ukraine and said Russian President Vladimir Putin had failed to break their unity.
"Putin has been counting on it from the beginning that somehow the NATO and the G7 would splinter. But we haven't and we're not going to," Biden said.
'PUTIN'S WAR MACHINE'
Delegates from the Group of Seven countries - Britain, Canada, France, Germany, Italy, Japan and the United States - were greeted with flowers as Bavarian mountain riflemen stood to attention in the sunshine at Schloss Elmau, a castle at the foot of the Wetterstein mountains.
Leaders are expected to discuss options for tackling rising energy prices and replacing Russian oil and gas imports, as well as sanctions that do not exacerbate the cost-of-living crisis affecting their own populations.
Soaring global energy and food prices are hitting economic growth in the wake of the conflict in Ukraine, with the United Nations warning of an "unprecedented global hunger crisis".
Climate change is also set to be on the G7 agenda.
Britain said the ban on Russian gold imports was aimed at wealthy Russians who have been buying safe-haven bullion to reduce the financial impact of Western sanctions. Russian gold exports were worth $15.5 billion last year.
"The measures we have announced today will directly hit Russian oligarchs and strike at the heart of Putin's war machine," British Prime Minister Boris Johnson said in a statement.
On the oil price cap and the gold import ban, Europe's Michel said the issues would need to be discussed further.
A French presidency official said Paris would push for a price cap on oil and gas and was open to discussing a U.S. proposal. However, he said the G7 needed to work towards getting a maximum oil price and this needed the buy-in of oil producers in the Organization of Petroleum Exporting Countries and its allies in a group called OPEC+, which includes Russia.
"We need to have discussions with OPEC+ and producing countries to achieve this," the official said.
As missiles struck the Ukrainian capital Kyiv on Sunday, hitting an apartment block and a kindergarten, Foreign Minister Dmytro Kuleba said the G7 must respond with more weapons and tougher sanctions on Russia.
Biden called the strikes acts of "barbarism".
The summit provides an opportunity for Scholz to demonstrate more assertive leadership on the Ukraine crisis.
He vowed a revolution in German foreign and defence policy after Russia's invasion in February, but critics have since accused him of dragging his feet.
Scholz has invited Senegal, Argentina, Indonesia, India and South Africa as partner nations at the summit. Many countries of the global south are concerned about the collateral damage from Western sanctions.
Oxfam and other campaign groups said the pain from food price spikes for developing countries was "visceral".
They want G7 leaders to tax excessive corporate profits to help those hit by the food crisis, cancel debts of the poorest nations and to support developing countries in their battle against the food crisis and climate change.
An EU official said G7 countries would impress upon the partner countries that food price rises were the result of Russia's actions not Western sanctions. (Reporting by Sarah Marsh, Andreas Rinke, Andrea Shalal, Philip Blenkinsop, John Irish, and William Schomberg; Editing by Raissa Kasolowsky; Writing by Sarah Marsh, Matthias Williams and Philip Blenkinsop; Editing by Peter Graff, David Goodman and David Clarke)