The 24-year-old Gustavsson reported feeling dizzy on Friday after undergoing a strenuous exercise during a physical. He skated with the team on Monday.
Doctors examined Gustavsson and decided to operate Tuesday, a procedure which involves inserting a catheter through the groin to fix an abnormal heartbeat.
The Leafs say Gustavsson, dubbed “The Monster” (Monstret) by the Swedish press, shouldn’t miss more than three days of training before he is allowed back on the ice.
Gustavsson was expected to compete for the Leafs’ goaltending job this season with Finnish veteran Vesa Toskala. He recently signed a one year contract with Toronto.
Leafs’ coach Ron Wilson has called Gustavsson the “best goaltender outside of the NHL”.
“He will play for us this year,” Wilson told reporters last week before the heart condition was known.
Gustavsson played last season in the Swedish Elite League (Färjestads BK) and led his team to the championship.
In 42 games, he posted a league-leading 1.96 goals-against average and recorded four shutouts.