Referring to apparent moves by the opposition to remove his government, Gilani told the Senate or upper house of parliament late Wednesday night that other parties would not be able to form government even if he resigned.
"There can be only one thing -- I will go and so will you. Then elections will not be held during our lifetime," he said.
"Parliament should complete its tenure, not the government, not the prime minister. We are not interested. We are better off sitting in the opposition, if there is an opposition," he said.
There should be democracy in Pakistan because parliament, media, civil society and the whole world would not accept dictatorship in the country, Gilani said.
He described the move by several persons, including main opposition Pakistan Muslim League-N chief Nawaz Sharif, to take the 'memogate' controversy to the Supreme Court as "a conspiracy against the parliament."
The government has been buffeted by a political and diplomatic storm since Pakistani-American businessman Mansoor Ijaz made public a secret memorandum that sought US help to prevent a possible military coup in Pakistan after the American raid that killed Osama bin Laden in May.
Sharif and eight others filed petitions seeking a probe into the memogate scandal.
The apex court, which has sought responses from the government and military leadership, is set to hear the case on December 19.
Gilani told the senate that after the emergence of the memo, he summoned Pakistan's envoy to the US, Husain Haqqani, and sought his resignation in the presence of the president, the army chief and the ISI head.
He said he had also referred the matter to the Parliamentary Committee on National Security.
"Then it (the memo issue) was taken to the Supreme Court. I have no objection. But it is a conspiracy against the parliament. The president along with the national assembly and the senate is part of the parliament," he said.
Gilani expressed regret that the memo issue, which was created by Ijaz, a person with "no credibility" and having a background of writing against Pakistan's important institutions and the security establishment, was taken to court.
"You can think what the motive behind it was," he said. "This is a conspiracy against the parliament. What do they want to achieve, what do they want to prove?" he asked.
Highlighting the importance of democracy for Pakistan's stability, he said abiding by the constitution and law is a must for the country's solidarity.
"If the constitution is not followed, then there are many dangers," Gilani warned.
Noting that his government was being given deadlines since it came to power about four years ago, he said: "We are not imported people. We are from this house."
He urged lawmakers to unite to support democracy.
Gilani made the remarks against the backdrop of speculation that President Asif Ali Zardari's abrupt departure to Dubai to seek treatment for a heart condition was linked to growing pressure on him from the military establishment in the wake of the memogate scandal.
Zardari's aides have dismissed reports that he will resign but memogate has resulted in one of the worst crises faced by Gilani's government.
Former US guv gets 14 yrs in jail for auctioning Obama's seat
Zardari discharged from Dubai hospital
'Muslims not happy with compensation for Mecca Masjid accused'
Mamata names retired high court judge to probe AMRI fire
Zardari suffered no stroke, not resigning: Gilani