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.