When the Bruins headed to the locker room after the second period, they knew what they were doing wasn’t enough. Three shots on goal in 20 minutes wasn’t going to beat the Nashville Predators, wasn’t going to end a two-game-skid.

“We knew that we could play better,” Johnny Boychuk said, after the team’s 3-2 overtime win at TD Garden on a snowy Thursday night. “We only had three shots in the second period. I mean, that’s not characteristic of our team. But we wanted to get more pucks on net, try to join the rush when there’s the opportunity to, try to get more pucks and bodies toward the net.

“Getting three shots in the second period just isn’t going to cut it. We knew that.”

They came out stronger and tougher in the third period, and it made the difference, with them taking a 2-1 lead on goals by Boychuk and Jarome Iginla. Then, after the Predators scored again with 5:25 to go, Brad Marchand made it all worth it just 54 seconds into overtime on a move that probably shouldn’t have worked.

“I was kind of getting ready to backcheck, because you never know with that move,” Marchand said. “Luckily, it went in.”

Patrice Bergeron had passed ahead to Marchand, who put the puck between the legs of Predators forward Mike Fisher, a play that took far more confidence than the winger has exhibited for much of the season. Marchand finished the winning sequence off with a wrister past goalie Marek Mazanec.

Marchand was, he said, just trying to get the puck on net. Instead, he got his 10th goal of the season.

“Most of the time he’s lost those pucks,” coach Claude Julien said of Marchand with a smile. “He was shocked that it worked. Give him credit for that. He was smart enough just to throw it at the net. Bergy’s there, and creates some havoc in front of there.

“Again, when [Marchand’s] skating, he makes things happen. I thought he skated well tonight. When he uses that outside speed, makes things happen a lot more. As you can see, in a lot of games he has that ability to cut from the outside to the inside pretty good. And that was one of his patented moves there tonight.

“It was one of those things where if it hits Fisher’s skates it’s a different ballgame, and he has to be ready to backcheck. Maybe I was surprised a little bit too that he still had the puck.”

The Bruins had fallen behind with 1:56 left in the second period, with Viktor Stalberg beating Niklas Svedberg. The goal occurred after a bad change by Zdeno Chara and Dougie Hamilton opened the ice for a pass to Fisher. Svedberg — making his NHL debut — was able to stop the initial shot, but the rebound ricocheted directly to Stalberg, and he didn’t miss.

It was one of the few missteps for the goaltender, who was roundly praised after the game, despite getting a ticket back to Providence.

“He did a great job,” Marchand said. “He really stepped up. He just seemed so calm out there, very poised. It’s pretty rare to see that out of a young guy coming up for his first game. But very impressed.”

The Bruins tallied their first goal at 4:55 of the third on a feed from Ryan Spooner to Boychuk that demonstrated what the young center can do with his slickness and speed after a rush down the left side. They took the lead on Iginla’s 13th of the season, the winger taking a pass from Milan Lucic just in front of the net, scoring, and then crash-landing in the crease.

Shea Weber knotted the game at 14:35 on a long rebound allowed by Svedberg.

But that just set up Marchand’s heroics.

“Earlier in the year, that probably would have been a turnover and a goal the other way,” Marchand said. “A little bit of luck there, getting that through. That’s just how it goes sometimes.”

With that goal, the Bruins took a bit of pressure off themselves.

After losing to the Senators and Islanders in their last two games, Julien had discussed the need to turn things around before a trip next week that features visits to three of the Western Conference’s heavyweights.

“We talked about it,” Lucic said. “We take pride in saying that good teams don’t lose two in a row. It’s only the second time this year where we had lost two in a row and we talked about turning it around and having an opportunity to do it here with the first game of 2014 and we can start the year off right.

“It was good to get that win and kind of build some momentum into Saturday, our last game before we head out West again, so we wanted to build toward that.”