Mr Erdogan said the suicide car bomb would serve only to strengthen the resolve of Turkey’s security forces.
The explosion, in Guven Park in the Kizilay district, a key transport hub, wounded at least 125 people.
Interior Minister Efkan Ala said an investigation would conclude on Monday and those responsible would be named.
No group has claimed responsibility for the attack, but government sources are casting suspicion on the outlawed Kurdistan Workers Party (PKK).
The Kurdish rebels have carried out a series of attacks on Turkish soil in recent months. The so-called Islamic State group has also targeted Ankara recently.
Mr Erdogan said in a statement that terror groups were targeting civilians because they were losing the battle against Turkish security forces.
Calling for national unity, he said Turkey would use its right to self-defence to prevent future attacks.
“Our people should not worry, the struggle against terrorism will for certain end in success and terrorism will be brought to its knees,” he said.
According to Turkey’s state-run news agency, Prime Minister Ahmet Davutoglu has postponed a visit to Jordan following the bombing.
The United States condemned the attack. US State Department spokesman John Kirby said: “We reaffirm our strong partnership with our Nato ally Turkey in combating the shared threat of terrorism.”
Nato Secretary-General Jens Stoltenberg also condemned the attack, saying there was “no justification of such heinous acts of violence”.
Turkey’s pro-Kurdish political party issued a statement condemning the attack. The Peoples’ Democratic Party (HDP) said it shares “the huge pain felt along with our citizens”.
The HDP is frequently accused of being the political wing of the PKK, an accusation it denies, and of not speaking out against PKK violence.
The blast happened at about 18:40 (16:40 GMT) on Sunday and the area was evacuated in case of a second attack.
Turkish Health Minister Mehmet Muezzinoglu told a news conference that 30 people were killed at the scene and four died later in hospital. Two of the dead are believed to be the attackers.
Mr Muezzinoglu said 125 people were being treated at several hospitals in Ankara, of whom 19 are in a critical condition.
Last month, a bomb attack on a military convoy in Ankara killed 28 people and wounded dozens more.
That bombing was claimed by a Kurdish militant group, the Kurdistan Freedom Hawks (TAK). It said on its website that the attack was in retaliation for the policies of President Erdogan.
Turkey, however, blamed a Syrian national who was a member of another Kurdish group.
Last October, more than 100 people were killed in a double-suicide bombing at a Kurdish peace rally in Ankara.
The BBC’s Mark Lowen in Istanbul said three attacks in the Turkish capital in less than six months show the multiple security threats that Turkey now faces.
The country that was the stable corner of the Middle East and the West’s crucial ally in a volatile region is now at a dangerous moment, he said.