Lawyers were demonstrating in Gazipur after a spate of attacks this year by militants against the judiciary when the bomber struck.
On Tuesday, twin suicide bombings in or near court houses in Gazipur and Chittagong killed 11 people and wounded dozens more.
Police believe that a person who died on the way to hospital after Thursday's explosion at a police checkpoint near the court building was the bomber.
A policeman later died in hospital, doctors said.
Among those hurt were five policemen and three journalists, witnesses and police said.
Tea vendor disguise
Kazi Fazle Rabbi, Gazipur district commissioner, said: "The suspected bomber ... disguised himself as a tea vendor.
"One of his flasks exploded when police stopped him for checking."
On Tuesday a suicide bomber entered the court complex in Gazipur, 30km north of Dhaka, donning a black robe to disguise himself as a lawyer, and set off the bomb strapped to his body.
Up to 100 people have been
wounded in this week's blasts
Earlier that day, a bomber attacked a police checkpoint outside a court building in the southern port city of Chittagong.
Nearly 100 people have been wounded in this week's blasts, which police and lawyers said were part of a campaign by militants to scare the judiciary before it tries rebels detained for other bombings.
Bangladesh has been hit this year by a wave of bombings blamed on militants demanding Islamic law in the mainly Muslim democracy.
Begum Khaleda Zia, the prime minister, has cancelled a visit to the United Arab Emirates, which was to begin on Saturday, because of the volatile situation in the country, foreign ministry officials said on Thursday.
Addressing a rally in western Kushtia town, Khaleda called "for national unity and consensus to fight the bombers and other militants".
Khaleda Zia has called for a public
consensus against the bombers
"Time has come for the whole nation to stand together and join hands in the fight against terrorists trying to destabilise our country," she said.
Lawyers called a national strike on Thursday to press for greater security and immediate government action to prevent further attacks on the judiciary.
Police and witnesses said 40 people were hurt in clashes between protesters and police in Dhaka, the capital, and the northern town of Bogra.
Earlier on Thursday, police said they found a "powerful bomb" at an administrative building at Narayanganj town, 16km east of Dhaka.
Hundreds of people from two outlawed Muslim groups, Jamaat-ul-Mujahidin and Jagrata Muslim Janata Bangladesh, have been arrested this year.
Lutufuzzaman Babar, the state minister for home affairs, said this month that there were reports that the Jamaat-ul-Mujahidin had set up a 2000-strong suicide squad.