Gagne opened the scoring on a tap-in from Victor Hedman at 5:11. Purcell flipped a loose puck into the net amid a scramble in front of the Maple Leafs goal on a power play at 12:44 of the first.
The victory was the fifth in a row for the Lightning, who lead the Southeast Division and trail Philadelphia by four points for the top spot in the entire Eastern Conference.
The loss was Toronto's sixth in its last seven games and spoiled an otherwise solid performance in goal by James Reimer, who faced 31 shots on goal.
'Happy' fan videos make Pharrell cry [VIDEO]
Pregnant Mila Kunis wins 'Best Villain' at MTV Movie Awards