Eleven of the injured are in a critical condition. More than 200 people were gathered at the funeral. The blast took place just as the congregation had lined up to offer prayers.
"The suicide bomber very easily came here and joined the participants," witness Gul Akbar told French press agency AFP. "There was not a single policeman to check him. We need the government's help to stop such attacks."
Prime Minister Syed Yousef Raza Gilani condemned the attack and reiterated the government's "resolve to root out the cancer of terrorism from every nook and corner of the country".
More than 4,000 people have died in suicide and bomb attacks in Pakistan since 2007.