Mr Erdogan said the so-called Islamic State (IS) was behind the attack, which targeted a Kurdish wedding party. Gaziantep, near the Syrian border, is known to have several IS cells.
The bomb wounded 69 people, Mr Erdogan added, 17 of them seriously.
The bomber targeted the wedding guests as they danced in the street.
The BBC's Seref Isler, who is from Gaziantep, says the city of 1.5 million was already on edge because of events in Syria, where IS has been battling Syrian Kurdish forces.
A suicide bomber believed to have links to IS killed two policemen in Gaziantepin May.