The law enforcement agencies came to know about the purported plan during the interrogation of a group of alleged militants arrested Wednesday after a shoot-out in Ahmadpur Sharqia near Bahawalpur district in the eastern province of Punjab.
Senior district police officer, Abid Qadri, said initial investigations showed the suspects were planning to attack the prime minister, Foreign Minister Shah Mehmood Qureshi and others.
He said they were part of the Qari Imran faction, a splinter group of the banned Lashkar-e-Jhangvi extremist outfit, which has links to Al Qaeda and the Taliban.
The group has been accused of involvement in several attacks, including one on the headquarters of Inter-Services Intelligence in Multan city in December that killed 12 people.
Qadri said more arrests were expected after the interrogation.
Several Pakistani politicians have faced threats from militants but it is the first time that a plan to kill Gilani and Qureshi has come to light.
Both leaders hail from Multan, around 80 km south-west of Bahawalpur, and regularly visit their hometown at weekends.