Judge Nasir-ul-Mulk told the Supreme Court on February 2 that there are grounds to proceed against Gilani, despite the government's insistence that it shouldn't reopen the case against Zardari because the president has immunity from prosecution while he is head of state.
Mulk says Gilani is required to attend the February 13 hearing.
Gilani later told parliament he would attend, saying: "I have attended the court when summoned in the past and I will attend again now."
If convicted of contempt, Gilani could face six months in prison and be disqualified from holding office, a development that would force early general elections in Pakistan.
But Gilani's lawyer, Aitzaz Ahsan, said there is still a possibility to appeal the decision, and that his disqualification from office must take place through parliamentary procedures.
"According to the constitution, he can remain prime minister even after conviction," Ahsan said. "The only way to remove him is under Article 63, Clause 2 of the constitution. Only the speaker [of the parliament] can make a case for disqualification."
Both Gilani and Zardari have been increasingly at loggerheads with Pakistan's powerful military elite since the U.S. raid that killed Al-Qaeda leader Osama bin Laden in Pakistan in May 2011.
Pakistan's embattled prime minister went before the Supreme Court on January 19 to explain his refusal to obey the court's order to ask Switzerland to reopen a corruption case against Zardari dating back to the 1990s.
The Swiss corruption case is one of several scandals involving Zardari amid rumors in Islamabad of an impending military coup. Zardari has downplayed the coup rumors.
Some analysts have asserted that the chiefs of Pakistan's military and intelligence services would prefer to see Zardari and Gilani removed from office through legal and democratic processes.
Zardari's political career has been dogged by repeated corruption allegations that led to his imprisonment from 1990 to 1993 and from 1996 to 2004. In between -- from 1993 to 1996 -- Zardari held several different cabinet posts in the government of his late wife, former Prime Minister Benazir Bhutto.
Zardari denies the corruption charges against him, saying they are politically motivated.
But in 2003, while Zardari was still in a Pakistani prison, a Swiss court also convicted Zardari and Bhutto in a $15 million money-laundering case, sentencing both to six months in prison and fining them $50,000. They also were required to return $11 million to the Pakistani government.
Pakistan dropped the Swiss case soon after Bhutto's 2007 assassination and Zardari's rise to power in 2008 as co-leader of the Pakistan People's Party. But there have been increasing calls for the Swiss case to be reopened as relations between Zardari and the military leadership have deteriorated.
In 2010, Swiss prosecutors said they could not reopen their case because Zardari has legal immunity as head of state.
The Swiss Justice Ministry says it needs a formal request from Pakistan's government before it can issue a ruling on whether to reopen the case, prompting Pakistan's Supreme Court to order Gilani to issue the request.
Zardari also is under pressure in Pakistan's so-called "Memogate" scandal. In that case, an American-Pakistani businessman alleged in a newspaper column that Zardari had his former ambassador in the United States write a memo asking Washington for support to prevent Pakistan's military from taking over the civilian government. Zardari says those allegations are part of "a conspiracy against the Zardari government."
With agency reports