Serbia coach Bogdan Obradovic conceded "this is a heavy blow, but we still have the singles."
The result left the tie likely to be decided in the final rubber on Sunday.
Top-ranked Novak Djokovic should level the semifinal against Milos Raonic, who took more than four hours to win his singles on Friday, then Janko Tipsarevic and Pospisil could meet in the decider.
Obradovic said "Pospisil will likely be tired after such dramatic two days."
The doubles was exciting from the get go, with the Serbians favored. Zimonjic, with 27 doubles wins since 1995, has partnered with Bozoljac for seven years. Nestor, with 30 doubles wins in 21 years, and Pospisil had been a team for only two years.
The Serbs saved three set points in the first tiebreaker to close the set.
In the second set, the Canadians broke Zimonjic to tie. Serbia won the third set by also breaking once.
The teams forced another tiebreaker in the fourth. Serbia wasted a 2-0 lead and Canada used this to push the match into the fifth set.
The final set was decided when Zimonjic double-foulted to concede the only broken serve. A Nestor volley won the match and the Canadians were over-joyed.
Bozoljac served 20 of the Serbs' 26 aces and they landed 71 percent of their first serves, but Canada took three of their four break chances to ruin the day for 8,000 home fans.
The winner will face the Czech Republic, which defeated Argentina in the other semifinal.