"They are working to destroy our country's morale and create chaos by deliberately targeting our nation's peace and targeting civilians with these heinous attacks," Erdogan said in a statement on the presidency website.
The attack began just over an hour into the New Year when the attacker shot dead a policeman and a civilian at the entrance to the Reina club, one of the city's most exclusive nightspots, and then went on a shooting rampage inside, Turkish officials said.
But Erdogan vowed that Turkey would continue its fight against terrorism.
"Turkey is determined to continue to fight to the end against terror and to do whatever is necessary to ensure the security of its citizens and secure peace in the region," he said.
He added that Turkey would deploy any means, from military, economic and political to social, against "terror organisations" and the countries supporting them, without giving details on which groups or nations he was referring to.