The device exploded in a market, in the northern Sadr City area, as families prepared for the Islamic festival of Eid al-Adha on Tuesday.
It was the deadliest bombing in Baghdad in six months.
Islamic State group (IS) has claimed responsibility, saying one of its members detonated an explosive vest.
The Iraqi government declared victory in its war against the Sunni Muslim jihadist group at the end of 2017.
However, sleeper cells continue to wage a low-level insurgency in the country.
It also claimed a twin suicide bombing attack in January in Tayaran Square that left 32 people dead. That was the deadliest bombing in the capital in three years.
Security sources told Reuters news agency that women and children were among those killed in Monday's attack on the al-Wuhailat market. Some shops were set on fire, they said.
An Iraqi military spokesman said Prime Minister Mustafa al-Kadhimi had ordered the arrest of the commander of the federal police regiment in charge of security in the market area, and that an investigation had begun.