The Swiss will play top seed Juan-Martin Del Potro in Sunday's final. The Argentine battled past unseeded Frenchman Edouard Roger-Vasselin 6-4 4-6 6-2.
Third seed Federer needed to survive another mid-match dip in form and a determined challenge from his big-hitting opponent to earn the chance to win his sixth title in his hometown tournament and guarantee qualification for the season-ender.
Backed by a noisy partisan crowd, he negotiated the first set comfortably, breaking the 23-year-old Pospisil's serve twice. But the lanky Canadian, who reached a career-high 39 in the world after a fine mid-year run, served more freely in the second set and found the corners with some explosive crosscourt groundstrokes.
He looked to have the idol of his junior tennis days on the ropes when he broke serve for the second time in the match in the fourth game of the final set. But the 32-year-old Federer brought his experience to bear, coming up with big shots on crucial points to break twice and clinch victory with an unreturnable serve down the middle.