The third suicide attack in the city in a fortnight comes as the Taliban face growing pressure to take up the Afghan government's recent offer of peace talks to end a more than 16-year insurgency that has claimed thousands of lives.
The group has not publicly responded to Ghani's invitation and previously said it would negotiate only with USA officials.
The bomber moved as close to the gathering as he could and detonated his explosives at the checkpoint outside, the spokesman said.
Security personnel inspect the site of the suicide attack.
The State Department has offered a $5 million reward for information on Pakistani Taliban leader Mullah Fazlullah in the latest USA effort to pressure militants in the South Asian nation.
At least seven people have been killed and seven others wounded after a suicide attack near a Shia mosque in the Afghan capital, Kabul, officials said.More news: Spain sees 1st feminist strike
Afghan President Ashraf Ghani said this while addressing the 2nd Kabul Process Conference which is being attended by representatives from more than 20 countries.
Daesh terrorists and Taliban militants also massacred dozens of civilians, mostly Shia Hazaras, during an attack on a village in Afghanistan's northern province of Sar-e Pul last August.
The spokesman for the Health Ministry, Wahid Majro, said several of the wounded were in critical condition and he feared that the death toll could rise.
The Taliban also ambushed members of the local police who were sent to assist the soldiers, killing 10 policemen and wounding nine, provincial police spokesman Khali Aseir said.
The Taliban said in a statement that 29 soldiers and police were killed in the attack, including four commanders. Mujahid claimed the Taliban had inflicted a far higher number of casualties, but the insurgents often exaggerate their claims.
The report couldn't be independently confirmed because of the area's remoteness.