Gilani and Kayani discussed "matters pertaining to national security in the backdrop" of the cross-border NATO air strike that killed 24 Pakistani soldiers in Mohmand tribal region last month, a statement issued by the Premier's office said last evening.
The statement did not say whether the two discussed the President's health.
Zardari's sudden departure to Dubai on Tuesday for treatment of what officials described as a previously diagnosed cardiovascular condition triggered speculation and rumours that he might be on the verge of resigning due to pressure from the military over the memogate controversy.
Pakistan's Ambassador to the US Hussain Haqqani was forced to resign over the secret memo sent to the US military seeking its help to prevent a possible coup.
A senior Pakistani journalist yesterday said that Zardari spoke to him on phone and seemed to be "in high spirits and upbeat", state-run PTV reported.
"I'm fine and will return soon," Zardari was quoted as saying by Hamid Mir of Geo News channel.
Zardari told Mir that "his detractors who were speculating about his health would be frustrated", PTV said.
Those who flee the country take their children along but he had left his son Bilawal Bhutto Zardari in Islamabad, Zardari reportedly said.
This was the first time Zardari spoke to the media since he went to Dubai for treatment.
The statement issued after the Gilani-Kayani meeting said the army chief informed the Prime Minister of steps taken by the army on the border with Afghanistan to "revamp the defence capabilities aimed at effectively countering the recurrence of the incursion into the Pakistan territory".
Gilani said his government will not "allow a similar attack on the country's sovereignty and any attempt in future will definitely meet the detrimental response."
The government and people of Pakistan are "ready to provide the armed forces all the necessary resources to bolster its defence and professional capabilities", he said.
Kayani thanked the Prime Minister and expressed the "firm resolve of the army to defend the country's sovereignty".
Separately, Gilani told reporters Pakistan is reassessing its relations with the US and NATO to redefine the terms for cooperation with them after the cross-border NATO air strike.
"There had been a lot of ups and downs in the relationship with the US and we really want to improve our relationship," he said.
The issue of the NATO attack on Pakistani military border posts on November 26 has been referred to the Parliamentary Committee on National Security, which has been asked to assess the situation and give recommendations to government, he said. "We are also holding an inquiry into the incident."
Earlier yesterday, US Ambassador Cameron Munter met Foreign Minister Hina Rabbani Khar to discuss the "current status of bilateral relations", the Foreign Office said.
Khar remarked that relations between the two countries "must be based on mutual respect".
In an apparent reference to the NATO air strike of November 26, Khar said "recent incidents have led to a re-evaluation" of Pakistan's terms of engagement with the US.
Munter assured Khar of "early conclusion" of the probe into the NATO attack and said the US would work with Pakistan to normalise the ties at the earliest.