Before storming out, Erdogan told Shimon Peres, the Israeli president: "You are killing people."
Peres told Erdogan during the heated panel discussion that he would have acted in the same manner if rockets had been falling on Istanbul.
Moderator David Ignatius, a Washington Post columnist, then told Erdogan that he had "only a minute" to respond to a lengthy monologue by Peres.
Erdogan said: "I find it very sad that people applaud what you said. There have been many people killed. And I think that it is very wrong and it is not humanitarian."
Ignatius twice attempted to finish the debate, saying, "We really do need to get people to dinner."
Erdogan then said: "Thank you very much. Thank you very much. Thank you very much. I don't think I will come back to Davos after this."
Amr Moussa, the secretary-general of the Arab League and former Egyptian foreign minister, said Erdogan's action was understandable.
He said: "Mr Erdogan said what he wanted to say and then he left. That's all. He was right," adding that Israel "doesn't listen".
The exchange took place on the second day of the summit, where business and political leaders have been discussing trade, financial regulation and global security.
After grappling with a bleak global economy on the opening day, leaders attending the forum switched to debates on the new administration in the United States and unrest in the Middle East, Pakistan and Afghanistan.
Kamal Nath, India's trade minister, warned that the global economic crisis could fuel protectionism to safeguard national industries and jobs.
Ban Ki-moon, the United Nations secretary-general, used the forum to announce the launch of an emergency appeal for $613m to help Palestinians recover from Israel's attack on Gaza.
Nath said that India saw growing signs of protectionism and would respond with its own measures if its exporters were threatened "which will be good for no one."
He said: "We do fear this because one must recognise that at the heart of globalisation lies global competitiveness, and if governments are going to protect their non-competitive production facilities it's not going to be fair trade.
India has raised tariffs on steel to protect local producers, a measure trade experts say was aimed at China, which India does not regard as a market economy.
The deepening economic crisis, and the failure to complete the World Trade Organisation's long-running Doha round on freeing up global commerce, have raised fears that countries will block their partners' exports to protect jobs at home.
Such protectionism, if it led to tit-for-tat retaliation, would intensify the current crisis.
The economies of India, China and Russia, which have been experiencing rapid growth in recent years, have taken precedence at the forum.
Developing countries such as India have experienced rapid growth in recent years [EPA]
Timothy Garton Ash, professor of European studies at Oxford University, said emerging markets are almost overshadowing the importance of the US economy.
"What is really striking to me about this Davos, is the lack of a sense of a new beginning with Barack Obama," he told Al Jazeera.
"That is not what we've been hearing about in the last 24 hours, we've been hearing about China, about Russia, about India, about emerging economies, and that I think is a very significant fact.
"It's not just the American investment banks that have gone down, it's America's own soft power, and ability to lead that has been badly damaged by the crash."
Rachid Mohamed Rachid, Egypt's minister of trade and industry, said there would be a rush towards emerging markets.
"People understand today that there will not be growth in developed countries for a long time to come, the growth will continue to be in emerging markets, even more than before," he told Al Jazeera.
The UN secretary-general said he had been deeply moved by his visit to Gaza and that he had given his word that the UN would help the Gazans in their hour of need.
|Ban announced the launch of an emergency appeal for $613m to help Gaza [AFP]
He said the appeal for fund covered the requirements of the UN and other aid organisations for the next six to nine months.
Ban said it would help provide aid such as medical care and clean water and that an appeal for longer-term needs would be launched later.
Asked about achieving peace in Gaza, Benjamin Netanyahu, the leader of Israel's Likud party who was attending the forum, swiftly turned his answer to Iran, which he said was in a "100-yard dash" to get nuclear weapons.
While he did not specify any planned military action, Netanyahu said if Iranian rulers were "neutralised", the danger posed to Israel and others by Hamas in Gaza and Hezbollah in south Lebanon would be reduced.
Netanyahu said the global financial meltdown was reversible but "what is not reversible is the acquisition of nuclear weapons by a fanatic radical regime".
Meanwhile, Manouchechr Mottaki, Iran's foreign minister, who is also in Davos, said Tehran had taken note of the intention of Barack Obama, the US president, to withdraw troops from Iraq and believed he should also pull troops out of Afghanistan.
Mottaki told a panel at the forum that Obama had "courage" to say which of the policies of George Bush, the former US president, he disagreed with and said his approach marked a "milestone" away from an era of "might equals right".