The court Thursday sentenced Gilani to 30 seconds of jail time -- the length of time it took to read the verdict, Dawn reported. He could have been sentenced to six months in prison, but the court ordered Gilani be "imprisoned" until the hearing adjourned.
"For reasons to be recorded later, the prime minister is found guilty of contempt for willfully flouting the direction of the Supreme Court," Judge Nasirul Mulk said.
Mulk said the conviction was "likely to entail serious consequences" for Gilani.
Gohar Khan, a member of the prime minister's legal team, said an appeal would be filed.
Nawaz Sharif, head of the Pakistan Muslim League, said Gilani should resign because of his conviction.
The basis for Thursday's conviction is a corruption case against Zardari involving kickbacks he and his late wife, former Prime Minister Benazir Bhutto, allegedly received from companies when she was prime minister in the 1990s. A Swiss court found the couple guilty in absentia in 2003. Zardari appealed.
Swiss prosecutors dropped case in 2008 after the Pakistani government approved a law granting immunity to Zardari and others.
The Pakistani Supreme Court ruled the law was unconstitutional in 2009 and ordered the government to request that the Swiss authorities reopen the case against Zardari. Gilani refused, saying the constitution grants the president immunity from criminal prosecution while in office.