It wasn’t pretty, but the offensively challenged Bruins produced the two points for which they were desperately looking last night.

The B’s erased a two-goal deficit, then beat the Toronto Maple Leafs in the shootout for a 3-2 win at the Garden. Tyler Seguin and Patrice Bergeron scored in the shootout, and Tuukka Rask stopped Nazem Kadri and Nikolai Kulemin to nail down the much-needed victory after a 1-3 road trip.

“It was a gutsy effort. Not a pretty effort, but a gutsy one,” said coach Claude Julien.

Julien clearly doesn’t think his team is quite out of the woods yet and believes it’s starting to feel the weight of the condensed schedule — so much so that he scrapped today’s scheduled practice.

But at least on this night, the B’s cranked it up in time to get the one point in regulation and then the bonus point in the skills competition to pull into a points tie with the Canadiens, who come to town tomorrow night for what could be yet another game for the Northeast Division lead (the Habs play in Pittsburgh tonight).

Perhaps the biggest development in this one for the B’s was the return of Milan Lucic. He’d entered the game on a 15-game goal-less skid and, in Julien’s shakeup of the forwards, he was dropped to the third line with Rich Peverley and Jordan Caron to start the game. He not only snapped that streak, but gave the B’s the emotional lift they needed.

The Leafs, who took a 3-0 lead on Saturday before holding off the B’s for a 3-2 win, again jumped out to a 2-0 advantage with a pair of second-period goals, one from Joffrey Lupul on the power play and the second on a Kulemin breakaway resulting from a blocked Aaron Johnson shot.

But Lucic — who recently looked hesitant and unsure of himself on the attack — ignited his team, the Garden crowd and himself at 9:49 of the second with his first goal since February 24. He took a feed from Peverley in the neutral zone, chugged past Cody Franson in the offensive zone, shifted to his forehand and beat goalie James Reimer between the pads.