Huge crowds were waiting at Istanbul airport in the early hours of the morning, with many people waving Turkish and Palestinian flags.
Correspondents said the crowds were shouting "Turkey is with you," and that some were holding signs greeting Mr Erdogan as "a new world leader".
"In Davos, all the world witnessed what has not been happening for many years," said Istanbul resident Mustafa Mastar.
"This showed the power of Turks. It showed that Turks are standing on their feet in Europe, in the world."
"Tonight I was really proud. I feel really happy," said Mustafa Sahin, another person in the crowd.
Crowds gathered at Istanbul airport to welcome Mr Erdogan
During the debate on Thursday, Mr Erdogan had clashed with Mr Peres, whose voice had risen as he made an impassioned defence of Israel's actions, jabbing his finger.
Mr Erdogan said Mr Peres had spoken so loudly to conceal his "guilt".
He said many people had died in Gaza and he found it sad that anyone would applaud Mr Peres for defending Israel's actions.
He then accused the moderator of not allowing him to speak and said he did not think he would return to Davos.
The Turkish PM stressed later that he had left the debate not because of his disagreements with Mr Peres but because he had been given much less time to speak than the Israeli leader.
Turkey PM storms off in Gaza row
He said he respected Mr Peres but that "what he says is not true".
Turkey is one of the few Muslim countries to have dealings with Israel, but relations have been under strain since the Islamist-rooted AK Party was elected to power in 2002.
But Mr Erdogan stressed to the crowds in Istanbul that "our hard words are not directed towards the people of Israel, not directed at the Jews, but they are totally directed towards the government of Israel".
He said no decision on Turkish-Israeli relations would be made "driven by momentary anger on such issues".
More than 1,300 Palestinians and 14 Israelis were killed during the three-week conflict in Gaza, which began on 27 December.
Thank you for all your comments on this issue - we're unable to publish them all but here is a broad cross-section of some of the remarks you've sent us.
I watched the debate myself. I have to say the moderation was poor, and it was true that Erdogan was not given the chance to respond. Moreover moderator behaved inapproriately towards the prime minister. Erdogan did the right thing Genc, Istanbul
It is interesting that the Turkish Prime Minister is so concerned for human rights of the Palestinians and yet look at what Turkey does to the Kurds. And let's not get started on the Armenians. Michael Julian, London
This has been another clear example of Erdogan's hypocrisy. It was only last year when Erdogan was welcoming Omar al-Bashir, Sudan's president to Istanbul who has been accused of genocide, crimes against humanity and war crimes in Darfur. If you disagree with killing of innocent people it should be on all grounds, not only for certain groups. Engin Turan, London, UK
First and foremost, I do not support Israel's actions in Gaza, nor should any sane human being. I think the Turkish Prime Minister's action and his comments are commendable to say the least. I have never respected any Prime Minister or leader as much as I now respect him. He has proven that world leaders can defend justice. His people's welcome is a God given sign of God' blessing of his action. Tina Saad, Al-Ain, UAE
Why should Erdogan be "hailed"? His actions showed an immaturity and a lack of ability to convey his thoughts. This is not the leadership qualities one would expect from a person in his position. Sam, USA
Erdogan is certainly not regarded as a hero in Turkey. It's true that for some Turks, the Palestine-Israel conflict is almost like a matter of pride, they always react more on this issue than say Muslims dying in Iraq or Sudan. Erdogan just exploits these feelings before the elections. This is a guy who says "rage is a type of rhetoric" and insults everyone from farmers to ambassadors in Turkey too. USA and EU supported him so far, in the benefit of their companies exploiting resources of Turkey. To me, this is a story of Erdoganís hypocrisy against the Western hypocrisy in the Middle East. Ozge , Lancaster
I believe it is unfair that the Moderator didn't give Turkey PM enough time to respond to President Peres's speech. The Washington Post Moderator reason came out as though Dinner is much more important than what these people are in Davos for. Is it really Dinner that these Politicians, World Leaders and Business Leaders fly to Davos for every year? Someone has to explain this to the rest of the world. These people care less about the real world problems and a lot more about their stomach and face time. This is quite sad. No wonder we have so many problems in the world. Talking through tough issues, and finding friendly ways to solving them take the back seat. Dinner takes the front seat. It is really, really sad. - Ed, SF, USA
One of the fundamental principles of debate is that both sides get a fair chance to present their arguments. Too often the media (including the BBC) fail in this when it comes to the Palestinian/Israeli issues. Erdogan did the right thing and I hope this highlights the lack of impartialty on their part due to the overbearing influence of Israel over the media. Irshad Akhtar, London, UK
I support Israel now more than ever. The Israeli Government has the right to defend its people. Eduardo Silva, Belo Horizonte - Brazil
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.