Gerber was tossed with 56 seconds remaining in Tuesday's 3-2 shootout win over the Washington Capitals after he pushed Leggo and shot a puck in his direction.
The actions violated rule 41.4, which calls for an automatic suspension.
Gerber was upset after Brooks Laich's goal made it 2-2. The Capitals forward stuffed the puck under Gerber, prompting the Toronto goalie to protest.
Gerber will miss Friday's game at Buffalo; March 28 against Boston; and April 1 against Philadelphia. He's eligible to return April 3 when the Leafs visit the Flyers.