Preliminary results showed Mr Erdogan had received 49.51 per cent of votes, short of the 50 per cent needed to win in the first round, High Election Board chief Ahmet Yener said on Monday.
His closest rival Kemal Kilicdaroglu had 44.88 per cent, the board said, while third-placed candidate Sinan Ogan had 5.17 per cent.
The remaining 35,874 uncounted overseas votes would not tip any of the candidates over the 50 per cent threshold, Mr Yener said.
The second round of voting will be held on May 28.
Before the final result, Mr Ogan said he could only support Mr Kilicdaroglu in the run-off if he agreed to offer no concessions to a pro-Kurdish party.
“We will consult with our voter base for our decision in the run-off. But we already made clear that the fight against terrorism and sending refugees back are our red lines,” he said.
Speaking earlier on Monday, Mr Erdogan said a second round would be “welcome”.
Mr Kilicdaroglu urged his supporters not to be disheartened.
“Do not fall into despair. I will stand upright.,” he tweeted shortly after the election board announcement.
“I will tell you my clear observations of what is happening. Then we will stand up and take this election together.”
He said earlier on Monday that he would accept the people's decision for a second round, as Mr Erdogan said another poll would be “welcome”.
Media outlets, which were banned from reporting on the election until after 6.30pm local time, offered differing predictions as votes were counted across the country.
State-run news agencies initially placed Mr Erdogan ahead of Mr Kilicdaroglu, while opposition officials accused Anadolu Agency of manipulating data in favour of the President.
“We will not sleep tonight, my people,” said Mr Kilicdaroglu, leader of the People's Republican Party (CHP), calling on the election board to release data from various provinces.
The election authority later said it was not withholding vote counts from political parties.
Election rallies in Turkey ahead of May 14 elections - in pictures
Opposition figures said the government was deliberately slowing down the count in districts where Mr Kilicdaroglu was enjoying strong support.
“They are contesting the count emerging from ballot boxes where we are massively ahead,” Istanbul's mayor, Ekrem Imamoglu, said.
State broadcaster TRT earlier showed Mr Erdogan leading with just over 50 per cent of votes, compared with Mr Kilicdaroglu's 43 per cent, based on almost 86 per cent of votes counted.
HalkTV, close to the CHP, also placed the President ahead of its candidate, although estimates continued to fluctuate as the night progressed.
But later, Mr Kilicdaroglu wrote on Twitter that “we are leading”, while Mr Imamoglu and Ankara Mayor Mansur Yavas also said he was on track for victory.
In past elections, Mr Erdogan has generally placed ahead in early results as votes from urban centres are still to be counted.
Exit polls are banned in Turkey.
Mr Erdogan also wrote on Twitter that hurried results were “stealing the national will of the people”.
CHP officials have said the party expects its highest turnout to date in Istanbul as polls closed in the country's most important presidential election yet.
“We expect record turnout in Istanbul,” said Canan Kaftancioglu, the CHP's provincial leader in Istanbul, where Mr Erdogan made a last attempt to appeal to voters at three separate rallies on Saturday.
Results from Istanbul are decisive in determining the course of the election.
Sunday's presidential election, accompanied by parliamentary elections, is the most important to take place in the 100 years of the post-Ottoman republic.
For the millions of first-time voters taking to the polls, estimates suggested they could wake up under a new leader for the very first time.
Mr Kilicdaroglu had been predicted to narrowly beat Mr Erdogan and clinch victory in a single round.
His spokesman, Faik Oztrak, said they were seeing a positive picture even as TRT showed Mr Erdogan leading.
Polling stations in Taksim and Besiktas were packed in the late morning and into the afternoon.
As polling drew to a close, police erected security barriers in the central Taksim Square, historically the scene of large political protests.