The bomber attacked a Shia mosque-cum-community centre at about 9.30 PM in densely populated Chittian Hatian area in garrison city of Rawalpindi.
A police official said that the attacker came on a motorbike and tried to enter the compound but set off the blast near the gate when he was stopped by volunteers deployed at the entrance.
"So far five people have been killed and 15 injured," police said. Some of the injured are in critical condition.
Prime Minister Nawaz Sharif condemned the attack.