Updated

If the New York Rangers' new top line is going to produce like this, it might not make any difference if the rest of the offense is a bit unbalanced.

Marian Gaborik scored twice 2:13 apart in the first period and then completed his 14th NHL hat trick 27 seconds into overtime as the Rangers overcame a pair of blown leads and beat the Boston Bruins 4-3 on Wednesday night for their first win of the season.

Instant results from the trio of Gaborik, Rick Nash and center Brad Richards made it possible.

"Your best players need to be your best players," coach John Tortorella said of the unit that produced three goals and five points. "They had some dips, as our team did throughout the game, but Gabby came through big."

Gaborik got the puck from Andrew Ference and then outraced him and Johnny Boychuk up ice. His first shot was blocked by goalie Tuukka Rask, but Gaborik batted the rebound out of the air to end the game and start a cascade of flying hats onto the ice to celebrate his fifth hat trick with the Rangers.

"I think Ference fumbled the puck," Gaborik said. "I just tried to chip it in front of me and tried to get some speed.

"I tried to shoot it at the blocker, and got a fortunate bounce on the rebound."

Taylor Pyatt also scored for the Rangers (1-2), who squandered leads of 2-0 and 3-2 en route to avenging a season-opening 3-1 loss at Boston on Saturday. Henrik Lundqvist made 26 saves.

Brad Marchand and Milan Lucic erased Boston's 2-0 deficit in the second period, and Nathan Horton got the Bruins even again at 3 with 4:23 left in regulation.

It was Horton's first goal in more than a year as he was sidelined by a concussion last January until the NHL resumed last weekend. The Bruins fell to 2-0-1 in their first road game of the season.

"At first we came out kind of sluggish," Horton said. "We realized that and turned it up in the second.

"It was a matter of just keep working."

Gaborik did just that. He scored his first three goals of the young season to help the Rangers pull off a much-needed win.

"It was a good game for us," Tortorella said. "We're still a pretty sloppy hockey team, and I think it's going to be that way for a bit."

The Rangers, who lost their home opener 6-3 to Pittsburgh on Sunday, will complete the second of their six back-to-back sets this season Thursday at winless Philadelphia.

After a poor first period, the Bruins controlled play early in the second and earned a power play 18 seconds in when Rangers defenseman Marc Staal was called for tripping. Marchand cashed in with his second goal of the season at 1:05.

Boston clamped down on defense, too, and turned an 11-4 shots disadvantage into a 13-11 lead before New York put its first puck in on Rask with 11:54 left in the second. That broke a stretch of 14 minutes, 14 seconds between Rangers shots.

The Bruins got to Lundqvist again after the Rangers left Lucic alone in front of the crease. Defenseman Zdeno Chara found him with a pass, and Lucic fired a hard forehand in on Lundqvist that was blocked. The rebound came right back to Lucic, who smacked the puck in with a second swipe to tie it at 12:24.

Just when it seemed the game had turned completely, Pyatt restored the Rangers' lead 46 seconds later when he put in a rebound of Derek Stepan's drive.

New York nearly had a two-goal lead again, but Carl Hagelin's drive that beat Rask was wiped off because Mike Rupp had been called for roughing before the shot.

"They had a couple of good chances in the last two minutes (of regulation)," said Rask, who made 29 saves. "Looking at it that way, the point is good."

In the first period, New York appeared to be in total control. It took until their third game for the Rangers to post their best period and grab their first lead.

Gaborik nearly scored his first less than 5 minutes into the game when he jabbed at a loose puck after Rask let it go free. Rask fell onto his back, with his arms outstretched inside the net like a snow angel, and the whistle blew. A video replay ensued, but the puck never crossed the goal line.

Just 26 seconds later, Gaborik finished off a brilliant end-to-end passing play for his 325th NHL goal.

Defenseman Michael Del Zotto started the play with a pass from behind his net out to center ice, where Richards deftly tipped it forward to Nash in the Bruins zone. Nash sent a crisp cross-ice pass to Gaborik, who patiently carried the puck down to the goal line and skillfully flicked a parallel shot under the crossbar behind Rask, popping the water bottle out of its holder on top of the net at 4:36.

Gaborik struck again moments later.

"He opens up a lot of space," said Nash, who has one point in his first three Rangers games. "He's one of the best scorers in the league, and people better beware when he's out there."

Rask had allowed a total of two goals in two games over 125 minutes of action this season before New York's big first period. The Bruins were being outshot 8-2 at the time, prompting Boston coach Claude Julien to use his lone timeout.

The Bruins doubled their shot total from four to eight in the final 2:31 of the period, despite being short-handed for two minutes after Adam McQuaid earned an extra roughing penalty when he dropped the gloves to fight New York's Brian Boyle.

"We redeemed ourselves pretty well. It could have been worse," Julien said. "The first 10 minutes is what obviously cost us the game. What I liked about our team is their resiliency to get back and start playing like the way we should have."

NOTES: RW Arron Asham, who made his Rangers debut Sunday vs. Pittsburgh, sat out because of a groin injury. ... Lundqvist made his 26th straight start against the Bruins, dating to Jan. 13, 2007. ... Boston has lost 10 of 14 to the Rangers and six of eight.