The Islamic State militant group claimed responsibility for the attack just after midnight on Tuesday, which Iraqi officials said involved apparently remotely detonated explosives inside a parked car.
The officials spoke on condition of anonymity in line with regulations.
The attack came just days into the holy month of Ramadan when Muslims fast during daylight hours.
After sundown, families break their fast and Baghdad's restaurants and cafes quickly fill up.
Related reading
IS-claimed suicide bombings kill 35 in Iraq
Videos posted to social media showed chaotic scenes on the streets surrounding the blast.
A number of wounded lay on the ground, others propped themselves up on the colourful park benches outside the ice cream shop. One young girl, wearing a ribbon and bow in her hair, wandered the scene dazed.
Ramadan is often marked by an uptick in violence in Iraq.
Last year, Baghdad was rocked by a huge truck bomb attack that targeted a popular retail district in the city centre where young people and families were shopping for new clothes ahead of the holiday that marks the end of Ramadan.
The blast killed hundreds in the single deadliest event in Baghdad since Saddam Hussein was toppled in 2003.
The IS group also claimed responsibility for that bombing, which ultimately led to the resignation of Iraq's interior minister.
Tuesday's attack comes as Iraqi troops are slowing pushing IS fighters out of their last strongholds in the northern city of Mosul.
Iraqi commanders say the offensive, which recently entered its eight month, will mark the end of the IS caliphate in Iraq, but concede the group will likely increase insurgent attacks in the wake of military defeats.