The incident occurred in Baldia Town area of Karachi at the 'Astana' (meeting place) of retired police officer Tikka Khan where 40 people, including women and children, were gathered, SSP Aamir Farooqi said.
"The Astana of the retired officer was used for religious gatherings where people came to seek blessings from a pir to find solutions for their problems," Farooqi said.
Rescue and police officials said eight persons died while the condition of some of the injured is critical.
"Those killed include a young girl while the injured include women and children," a rescue official said.
Also Read
He said the armed men, who were riding motorcycles, first threw grenades at Astana Meherban Shah and then opened fire.
The banned Tehrik-e-Taliban Pakistan (TTP), who are holding talks with the government, said they had nothing to do with the attack, Dunya news channel reported.
The TTP in the past has attacked shrines and other religious places where people come to see pirs (Saints).
In one incident at a shrine in Gadap outside Karachi, six bodies were found, some of them with their heads severed.