The rush happened during the post-funeral prayer and feast for former mayor Mohiuddin Chowdhury.
Speaking to the AFP news agency, a police official said the death toll could rise because at least 15 of the wounded were critically injured.
It appears the stampede began as mourners rushed to receive free food packets.
Mr Chowdhury, who had served the city corporation for 16 years, died on Friday at the age of 73.
Local newspaper The Daily Star says the incident happened in the Jamal Khan area at a memorial event organised for the minority Hindu community.
A police official told the paper all of the dead were men who had been attempting to attend the event.
Hundreds rushed to a community centre prayer meeting to get free food packets distributed in the former mayor’s memory, police quoted by Reuters news agency said.
“We repeatedly announced on the loudspeaker that there were adequate stock of foods at the centre, but when the gate was opened, hundreds of people tried to enter at the same time,” a local leader of the ruling Awami League party told Reuters.
The feast, a part of Muslim funeral tradition, was hosted across a number of venues in the city because of Mr Chowdhury’s status and drew many thousands of attendees.
Police staged baton charges to clear crowds at the feast, AFP reports. (Courtesy BBC)