The suspected bomber struck a police patrol van at a checkpoint outside the shrine of Sufi saint Data Gunj Bux, local broadcaster Dunya News reported, quoting officials.
"Eight people including five police personnel are confirmed dead and 25 are injured," Arif Nawaz, police chief of the Punjab province, told reporters.
Nawaz said the blast was act of a suicide bomber who acted alone.
Authorities fear the death toll will rise as several of the injured were said to be in critical condition, the broadcaster reported.
Footage aired by the broadcaster showed the mostly charred police vehicle lying on the road as rescuers shifted the injured and dead into ambulances.
Blood-soaked shoes, caps, pieces of clothing and splintered wood and glass littered the scene.
Prime Minister Imran Khan condemned the terrorist attack and directed security forces to expedite efforts to bring the culprits to justice, according to a statement from the Prime Minister’s House.
There was no immediate claim of responsibility for the attack.
In July 2010, some 24 people were killed in a suicide attack at the same shrine.
A blast at one of Pakistan's oldest and most popular Sufi shrines killed at least four people and wounded 24 in the eastern city of Lahore Wednesday, police said, as the country marks the fasting month of Ramadan, AFP reports.
Police have said they are still investigating the nature of the blast, which occurred near the entrance gate for female visitors to the 11th-century Data Darbar shrine, one of the largest Sufi shrines in South Asia.
State TV aired footage showing damaged vehicles and emergency personnel at the scene.
The shrine has been targeted previously -- a 2010 suicide attack there killed more than 40 people -- and is guarded by heavy security.
Sufi worshippers, who follow a mystical strain of Islam, have frequently been the target of bloody attacks in Pakistan by Islamist militants -- including the Islamic State group -- who consider Sufi beliefs and rituals at the graves of Muslim saints as heresy.
Senior police official Muhammad Ashfaq told a press conference that the security personnel at the shrine were targeted, but stressed that the cause of the blast remains under investigation.
Three police officials and a civilian were killed, he added.
The blast may have been "a suicide attack" on a security vehicle, added police official Muhammad Kashif.
Pakistan's push against extremism was stepped up after the country's deadliest ever attack, an assault on a school in Peshawar in 2014 that left more than 150 people dead -- mostly children.
Since then, security has dramatically improved -- but militants retain the ability to carry out dramatic attacks.
Major urban centres such as Lahore, Pakistan's second largest city and the provincial capital of its wealthiest province, Punjab, are not immune.
An attack in the city in March last year left nine people dead, while a major blast targeting Christians celebrating Easter in a park in 2016 killed more than 70 people.
Critics have long argued the military and government crackdown has not addressed the root causes of extremism in Pakistan, where hardline Muslim groups often target religious minorities.
The Data Darbar complex contains the shrine of Saint Syed Ali bin Osman Al-Hajvery, popularly known as Data Ganj Bakhsh. Originally from Afghanistan, he was one of the most popular Sufi preachers on the subcontinent.
Tens of thousands of pilgrims visit the shrine each spring to mark his death anniversary, while it is also crowded weekly with worshippers listening to qawwali, a traditional form of Islamic devotional music.