The explosion on Saturday happened at around 10:30 local time (1730 GMT) in the remote town of Fatahpur, around 300km from Quetta, the capital of Baluchistan province, officials said.
There was no immediate claim of responsibility for the attack, and police said they were investigating.
"I saw 25 bodies myself. People were crying and there were pools of blood," Moahammad Amin Umrani, the mayor of neighbouring Naseerabad, told reporters by telephone.
Scores of people were also injured in the blast, he said.
Between 10,000 and 20,000 had gathered for an annual gathering at the shrine and many were having their evening meals when the bomb went off, said Syed Kami Shah, the brother of the shrine's custodian.
There was no indication if the blast was linked either to longstanding sectarian tensions between the rival Sunni and Shia sects or to an escalating tribal rebellion that has hit Baluchistan in the last year.
Pakistan has a history of sectarian violence, mostly blamed on rival majority Sunni and minority Shia extremist groups. About 80% of Pakistan's 150 million people are Sunnis and 17% are Shias.
Dozens were killed and
injured in the latest blast
Saturday's attack comes two weeks after the arrest of a suspected Sunni fighter accused of killing as many as 130 Shias in different attacks in recent years.
Ramzan Mengal, a member of the outlawed Lashkar-e-Jhangvi group, was arrested on March 4 in the provincial capital, Quetta, as he was going to a mosque for evening prayers.
Police said Mengal was believed to be involved in a March 2004 attack on a procession of Shia in Quetta that left 45 people dead.
Lashkar-e-Jhangvi is an al-Qaida-linked group, one of several outlawed by President Gen. Pervez Musharraf in 2001 and 2002.
Other apparently sectarian attacks in recent months in Pakistan have included a suicide bombing at a Shia mosque in October that killed 31 people in the eastern city of Sialkot.
Six days later, a car bombing at a Sunni gathering in the central city of Multan killed 40 people.
Also late on Saturday, two homemade bombs went off in a residential area of Turbat, a town about 650km southwest of Quetta, injuring four people, local police official Naqeeb Ullah said.
He said they have no idea who carried out the attacks.