Wabel Abdallah, the head of the IMF’s Afghanistan office, and the UN civilian staff died in what UN chief Ban Ki-moon said was a “horrific attack”.
Canadians, Lebanese, Britons and Americans were among the 13 foreign victims; the other eight were Afghans.
The Taliban said they carried out the attack late on Friday.
Five women were among the dead at the city’s popular Taverna du Liban, and at least five were injured, police say.
The restaurant in Kabul’s Wazir Akbar Khan area is popular with foreign nationals, diplomats and aid workers, and was busy with diners at the time of the attack.
A suicide attacker detonated his explosives outside the gate of the heavily fortified restaurant, Deputy Interior Minister Mohammad Ayoub Salangi said.
Mohammad Ayoub Salangi said two gunmen then entered the restaurant and started “indiscriminately killing” people inside.
IMF chief Christine Lagarde later confirmed that Wabel Abdallah, 60, a Lebanese national, was among those who died.
“This is tragic news, and we at the fund are all devastated,” Christine Lagarde said in a statement.
Meanwhile, UN Secretary General Ban Ki-moon condemned “in the strongest terms the horrific attack”, his spokesman said.
“Such targeted attacks against civilians are completely unacceptable and are in flagrant breach of international humanitarian law. They must stop immediately,” Ban ki-moon was quoted as saying.
At least two US citizens died in the attack, the US embassy in Kabul said.
Kamal Hamade, the well-known Lebanese owner of the restaurant, and five women were among the dead. A number of people were injured.
“I was sitting with my friends in the kitchen when an explosion happened and smoke filled the kitchen,” Abdul Majid, a chef at the restaurant, told AFP news agency.
“A man came inside shouting and he started shooting. One of my colleagues was shot and fell down. I ran to the roof and threw myself to the neighboring property.”
The attackers were eventually shot dead by the security forces when they arrived at the scene.
RvUbgd1oL8kImage source: Wikimedia Commons President-elect Donald Trump celebrated his election victory at the Ultimate Fighting…
Millions of voters across the US chose to return Donald Trump to the White House…
Donald Trump declares victory in the US election as he addresses jubilant supporters in Florida.…
Stocks around the world are rising as Donald Trump appears to be on the cusp…
Donald Trump has won Pennsylvania, North Carolina and Georgia and taken a lead over Kamala…
Quincy Jones, the celebrated musician and producer who worked with Michael Jackson, Frank Sinatra, Ray…