Headley, 50, made the claim during his testimony in the trial of the Mumbai attack co-accused Rana in Chicago.
Headley told jury during the course of questioning on Thursday that Prime Minister Gilani attended the funeral of his father Syed Saleem Gilani and also offered condolences to the bereaved family.
"Did the prime minister attend your father's funeral?" asked Rana's attorney Patrick Blegen. "Yes," replied Headley.
Saleem Gilani was former director general of Radio Pakistan and worked for the Pakistani embassy in Washington DC. The Prime Minister's Office also clarified that the well-known broadcaster died in December 2008 in Lahore, and not in 2010.
"The prime minister never attended Saleem Gilani's funeral and had only visited Danyal Gilani's (Headley's half-brother) house to condole the death," a spokesman for Gilani's office said.
The spokesman also denied the report that Danyal Gilani currently works as a public relations officer in the prime minister's office. Danyal Gilani is currently posted as the spokesman at the Pakistani embassy in Beijing.
In a statement issued in November 2009, Danyal had claimed the Indian media was creating "unnecessary hype" about his purported links to the prime minister.
Danyal also said that he had had "very little contact" with Headley since 2002.
Pakistan PM attended funeral of Headley's father in 2010
Not proud of Mumbai terror attack: Headley
ISI trained me in espionage against India: Headley
I was pleased to watch 26/11 on TV: Headley
How India should react to Headley's testimony