The Leafs also sent the 94th pick in Saturday's NHL draft to St. Louis in the deal.
Polak, a 28-year-old right-handed defenceman, fills a need Toronto had for a stay-at-home defenceman. Breakdowns contributed to an eight-game losing streak near the end of the season that tanked the Leafs' playoff hopes.
The Czech native has 79 points in 424 games of NHL experience.
Gunnarsson, a 2007 seventh-rounder, had spent five seasons with the Leafs.
It's really exciting. I'm pretty sure that when I play my first game I'm going to be emotional. To be back on the ice playing a game, being in game situations, with all the routines and rituals I do before games and during the game, I feel like I'm going to be emotional. I'm going to be really happy.
— Montreal Canadiens forward Tim Bozon on playing for the first time since his life-threaning illness