It was the first time Erdoğan has given an indication of how long Ankara might continue down the path towards EU entry, and his comments came at a time of growing alienation between Turkey and a political entity it feels has cold-shouldered it.
Turkey's bid to join the EU, officially launched in 2005, has virtually ground to a halt in recent years due to opposition from core EU members and the failure to find a solution to the dispute over the divided island of Cyprus.
Asked during a panel discussion in Berlin on Tuesday night if Turkey would be an EU member by 2023, Erdogan answered, "they probably won't string us along that long. But if they do string us along until then the European Union will lose out, and at the very least they will lose Turkey."
The Turkish republic will mark its centenary in 2023.
The predominantly Muslim but secular country of some 74 million people would strengthen the EU, Erdoğan said. Some 6 million Turks already live within the EU, about 3 million of them in Germany, he said.
German Chancellor Angela Merkel, who Erdoğan will meet on Wednesday, opposes full EU membership and favours a privileged partnership instead, although Foreign Minister Guido Westerwelle supports Ankara's bid.
Speaking at the opening of Turkey's new embassy in Berlin, Westerwelle criticised the impasse in accession talks. "It is bad for both sides and next year, we want to make a new beginning to overcome this standstill."
Earlier this month Turkish Economy Minister Zafer Çağlayan scoffed at the EU's winning the Nobel Peace Prize and condemned the bloc as the most hypocritical organisation in the world, saying it had "kept Turkey waiting at its door for 50 years."
Turkey has completed only one of 35 policy "chapters" every accession candidate must conclude. All but 13 policy chapters in Ankara's negotiations are blocked and the European Commission, the EU's executive arm, says Turkey does not yet meet required standards on human rights and freedom of speech.