Smith was perfect in relief of goalie Dwayne Roloson, and Gagne snapped a tie in the third period for the Tampa Bay Lightning, who erased an early three-goal deficit and evened the Eastern Conference finals with a 5-3 win in Game 4 over the Bruins on Saturday.
Roloson was pulled in the first period after he allowed three goals on nine shots. Smith came on and made 21 saves as the Lightning avoided dropping into a big hole against the surging Bruins. Boston will host Game 5 on Monday.
"There's no time to think," Smith said. "It's just one of those things where we got behind the 8-ball there in the first. That's why I'm on the bench, to come in and kind of settle the team down and give them a little bit of a momentum. It ended up working out."
Gagne scored the winning goal last season for Philadelphia when the Flyers rebounded from a 3-0 series deficit and a 3-0 hole in Game 7 to beat the Bruins in the Eastern Conference semifinals.
"I think what happened last year, it's behind [us]," Gagne said. "Things are different now. I'm playing with a different team. Boston is a different team. Right now it's just going out there and trying to be the difference in the game."
Teddy Purcell scored twice in the second period when the Lightning tied it at 3. Tampa Bay also got a goal from Sean Bergenheim, who leads the NHL with nine playoff goals after scoring 14 times during the regular season.
Martin St. Louis sealed the win in the final minute with an empty-net goal.
Gagne gave the Lightning a 4-3 lead when he beat Tim Thomas from the right circle 6:54 into the third period after Tampa Bay left wing Ryan Malone stole the puck near the blue line. The Lightning outshot the Bruins 9-1 through the first seven minutes of the period after scoring three unanswered goals in the second.
"We got outworked," Thomas said. "They took over. They took the play to us. They started getting scoring chances and we stopped getting scoring chances."
Smith replaced Roloson with two minutes to go in the first and then made 13 saves in the second en route to his first NHL playoff win in his second career postseason appearance -- both this series in relief of Roloson.
Lightning coach Guy Boucher said Saturday's game doesn't change Roloson's status.
"We have our No. 1 goaltender," Boucher said. "He's taken us to this place right now, and that's the reason why we're here. Smitty has been terrific. So whenever it's time for him to help the team and try to change the momentum around, I don't hesitate. It was the same in Boston. We put him in. I don't remember the last bad game he's played."
Patrice Bergeron scored twice during a three-goal first period that put the Bruins up 3-0. The alternate captain missed the first two games of the series because of a concussion sustained when he was hit by Philadelphia's Claude Giroux in the final game of the second round.
"We stopped battling," Bergeron said. "The second, we sat back and they've got too much speed. We weren't executing at all. We were on our heels. It's frustrating. We've got to be a lot better."
Michael Ryder also scored for the Bruins, who had won two straight in the series.
"A lot of our players did not play their best game," Boston coach Claude Julien said. "We just lost our focus."
Purcell cut the Lightning's deficit to 3-2 with a pair of goals midway through the second. The first came on a backhander from the slot at 6:55. The right wing followed that with a goal from the right circle 1:03 later.
"It was a good shift for me, and one I'll always remember, that's for sure," Purcell said.
Bergenheim outworked Boston defenseman Tomas Kaberle for the puck behind the net and scored from below the right circle to tie it at 3 with 9:07 left in the second.
"We just have to let this one go," Bruins center Brad Marchand said. "We're going home in our building for Game 5 and we're excited about it."
It was Tampa Bay's second quick three-goal surge in the series. The Lightning scored a team-playoff record three times in a 1:25 spurt of their 5-2 win in Game 1.
Thomas, coming off a 2-0 victory in Game 3, had a scoreless stretch of 93 minutes, 40 seconds snapped when Purcell scored his first.
"I think the focus should be on winning the next game," Thomas said. "It is what it is. It's 2-2. I don't know what the use of worrying about that [momentum] would be."
Bergeron put the Bruins up 1-0 11:47 in after he got possession of the puck near the post and put a shot past Roloson. The goal came after Lightning defenseman Victor Hedman made an ill-advised pass from behind the net that got past teammate Brett Clark.
Ryder got a break at 16:34 when his pass toward the slot was deflected by Tampa Bay defenseman Mike Lundin and got past Roloson.
The Lightning not only failed to score on a power play, but allowed Bergeron's short-handed goal late in the first. The center made it 3-0 with 2:02 left in the period after stealing a pass by Lightning center Steven Stamkos in the neutral zone and firing a shot from the top of the left circle past Roloson, who was then removed from the game.
Bergeron has four goals and 14 points in 13 playoff games this season.
Tampa Bay right wing Steve Downie received a roughing penalty and a 10-minute misconduct during a scrum as the first period ended. Tampa Bay's Marc-Andre Bergeron and Boston's Rich Peverley both got fighting majors.
Bruins C David Krejci was a minus-3, and lost 9 of 12 faceoffs. ... The Lightning dominated faceoffs overall, winning 39 of 65. ... Tampa Bay D Pavel Kubina, out since the first game of the conference semifinals against Washington when his head went into the glass on a hit, missed his seventh straight game. He hasn't resumed skating and there is no timetable for his return. ... Boston fell to 7-1 in the postseason when scoring first. ... Smith also replaced Roloson in Tampa Bay's 6-5 loss to Boston in Game 2.