At least 1,300 Palestinians were killed during Israel's 22-day aerial, naval and ground assault on Gaza. Thirteen Israeli citizens died over the same period.
Speaking to Al Jazeera at the Swiss resort, Tony Blair, the Middle East envoy for the quartet of the European Union, Russia, the United Nations and the United States, said: "Given what's happened in Gaza it would be surprising if people didn't feel really strongly about it.
"Prime minister Erdogan, I know, because I spoke to him earlier in the day, feels passionately and really sad about what has happened to the people of Gaza.
"And it's inevitable that you get this kind of incident".
During the heated panel discussion, Peres told Erdogan that Turkey would have acted in the same manner as Israel 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."
Peres told reporters after the incident that Israel is not in conflict with Turkey.
"I don't see this as a personal or national problem. The relations can remain as they are. My respect [for him] hasn't changed. It was an exchange of views and views are views," he said.
Hamas, which has de facto control of the Gaza Strip after pushing Fatah fighters out of the territory in June 2007, commended Erdogan for his action.
"Hamas pays tribute to the courageous stand of Turkey's prime minister ... who in Davos directly defended the victims of the criminal Zionist war against our children and women in Gaza," Fawzi Barhoum, a Hamas spokesman, said on Friday.
"We consider his departure from the room an expression of support for the victims of the holocaust carried out by the Zionists."
Amr Moussa, the secretary-general of the Arab League and former Egyptian foreign minister, who was also in the debate, said Erdogan's action was understandable.
"Mr Erdogan said what he wanted to say and then he left. That's all. He was right," he said, adding that Israel "doesn't listen".
"Turkey was Israel's best friend in the Muslim world. I think Israel has to come to grips with the fact that it has alienated a very large proportion of the world's population"
International Crisis Group
Turkey has in recent months brokered indirect talks between Israel and Syria over the Golan Heights region, which Israel captured from Syria in 1967.
The exchange between Erdogan and Peres took place on the second day of the summit, where business and political leaders have been discussing trade, financial regulation and global security.
Gareth Evans, the president of the International Crisis Group think-tank, told Al Jazeera that Erdogan's walk-out was "deeply depressing".
"I thought the tone of the debate had been reasonably moderate up until Shimon Peres laid some heavy-duty stuff on the line, in a very uncompromising and rather un-Peres like fashion," he said.
"In particular, what was depressing was Peres' utter unwillingness to acknowledge the real significance of the Arab peace initiative and to respond to Erdogan and Amr Moussa, saying how important it is that Israel formally say that the plan is a major step towards peace.
"Turkey was Israel's best friend in the Muslim world. I think Israel has to come to grips with the fact that it has alienated a very large proportion of the world's population."
Peres said his outburst was in response to repeated criticism of Israel for its Gaza operation.
He said: "They try to make the Israeli policy an ugly story. Israel is a democracy. It is fighting one of the most dangerous, terroristic, dictatorial groups.
"All of a sudden to be a humanitarian is to support dictators, to support terror, to support killing innocent people".
Meanwhile, the Davos forum continued into its third day on Friday, with Al Gore, the former US vice-president and Nobel Peace prize winner, participating in a discussion on the environment.
Referring to a UN meeting in Copenhagen later this year aimed at concluding a global agreement on reducing emissions, Gore said Barack Obama, the new US president, and other world leaders should seal a quick deal despite the pervasive global financial crisis.
He said: "The new administration is very serious about this. We need an agreement this year, not next year or some other time."
Gore called Obama "the greenest person in the room" for making environmental funding a large part of the $819bn economic stimulus bill passed by US politicians this week.
"I think it's important for the world leaders gathered here to fully appreciate the magnitude of the change in US leadership," he said.