WASHINGTON -- The Washington Capitals scored twice in the final minute of regulation before Lars Eller completed the comeback by scoring at 2:01 of overtime for a 5-4 win against the San Jose Sharks at Capital One Arena on Sunday.

After Braden Holtby stopped Sharks defenseman Brent Burns on a breakaway, he sent a stretch pass to John Carlson, who skated in on a 2-on-1 and fed Eller for the winner.

"When you make that long stretch pass, you can usually catch two players, especially on the changes," Eller said. "We did exactly that. Two-on-one to [Carlson] and once he made that pass to me, I saw the goalie really slide over to cover the short side, so I just tried to go somewhere off side where it was open."

[WATCH: All Sharks vs. Capitals highlights]

Logan Couture scored into an empty net to make it 4-2 at 19:00 of the third period, but Jakub Vrana scored his second goal of the game 13 seconds later to cut it to 4-3.

T.J. Oshie tied it 4-4 with a one-timer short side from the right circle with 14.2 seconds remaining off a pass from Evgeny Kuznetsov, who played after missing practice Saturday because of an illness.

Video: SJS@WSH: Oshie nets game-tying goal from circle late

"Of course, all that's forgotten if you score in overtime," Sharks coach Bob Boughner said. "We had a post, 2-on-1 and a breakaway. So that's the way the game goes."

Nic Dowd also scored and Holtby made 25 saves for Washington (29-9-5), which rallied after trailing by multiple goals in the final minute of regulation to win for the first time in its history.

"We don't ever want to put ourselves in a situation where we have to score late goals like this," Vrana said. "But at the same [time], it shows character, shows that we're a strong group here. We never give up and that's huge points today we grabbed from this game."

Evander Kane scored a hat trick in the second period for San Jose (19-21-4), which was playing the second game of a back-to-back after a 3-2 win against the Columbus Blue Jackets on Saturday. Martin Jones made 24 saves.

Video: Evander Kane scores his third career hat trick

"We were the better team, I thought, for most of the game," Kane said. "We, obviously, weren't able to close it out. That's the bottom line."

Kane, who has four goals in his past two games, gave the Sharks a 1-0 lead with a power-play goal at 6:25 of the second period when his one-timer went through the legs of Barclay Goodrow.

Dowd scored 64 seconds later to tie it 1-1 with a one-timer under the right pad of Jones off a backhand pass from Brendan Leipsic.

Shortly after exiting the penalty box, Kane took a drop pass from Couture and beat Holtby with a wrist shot from the top of the right circle to make it 2-1 at 10:06.

Kane completed the hat trick to make it 3-1 at 16:49 with another power-play goal. Erik Karlsson's initial shot was blocked by Garnet Hathaway, but Kane got the rebound and quickly scored from the high slot.

San Jose went 2-for-4 on the power play after going 3-for-52 in its previous 22 games.

"We won the special teams," Boughner said. "Usually that's a recipe for a win, especially against the [Capitals], but it wasn't in the cards tonight."

The Capitals pulled to within 3-2 at 18:42 of the second when Oshie intercepted Marc-Edouard Vlasic's pass behind the net, circled out and sent a cross-crease pass to Vrana.

Video: SJS@WSH: Vrana buries goal thanks to Oshie turnover

"We had everyone tugging the rope and when you have that, it's fun and sometimes you get wins where maybe you shouldn't win or you are out of it," Oshie said. "But when everyone is working and everyone is contributing, you can find ways to win."

They said it

"Third period we didn't really allow a lot 5-on-5. Defensively, we were pretty tight. You can take a million great things out of this game for us, but that's why they're leading the League, that's why they have the most points, because they're finding ways to win games." -- Sharks coach Bob Boughner

"It's something that we have a plan [for], we have a number of the same personnel. They're situations that we believe in those players. They're players that are not fazed by pressure, they're anxious to get out there and try to be the guys that tie up the game." -- Capitals coach Todd Reirden on his team, which leads the NHL with seven 6-on-5 goals

Need to know

Kane's hat trick was his third in the NHL and second this season (Oct. 16 against the Carolina Hurricanes). … San Jose is 8-for-8 on the penalty kill in its past four games. … Vrana has scored three times in his past two games after going 10 games without a goal. … Capitals forward Alex Ovechkin received a video tribute on the 10-year anniversary of his first game as captain (Jan. 5, 2010 against the Montreal Canadiens).

What's next

Sharks: At the St. Louis Blues on Tuesday (8 p.m. ET; FS-MW, NBCSCA, NHL.TV)

Capitals: Host the Ottawa Senators on Tuesday (7 p.m. ET; NBCSWA, RDS2, TSN5, NHL.TV)

Video: Capitals rally late, defeat Kane, Sharks in overtime