"It's just like a dream," Ovechkin said.
[WATCH: All Capitals vs. Golden Knights highlights | Complete Golden Knights vs. Capitals series coverage]
Lars Eller scored the Cup-winning goal at 12:23 of the third period after Devante Smith-Pelly tied it 3-3 at 9:52.
Ovechkin, who is the first Russia-born captain to win the Stanley Cup, and Jakub Vrana scored, and Braden Holtby made 28 saves for the Capitals, who reached the Cup Final once previously, in 1998, when they were swept by the Detroit Red Wings.
This was their 43rd season. It was Ovechkin's 13th season and Washington's 10th appearance in the Stanley Cup Playoffs since 2008.
"Years of heartbreak, years of breaking things down and trying again, breaking things down and trying again," Holtby said. "This group never gave up, and we finally did it."
Ovechkin won the Conn Smythe Trophy as MVP of the playoffs. He led the League with 15 goals, setting a Capitals record for a single postseason.
Video: #ThirstForTheCup: Caps win their first Stanley Cup
The Capitals tied an NHL record for most road wins in a postseason (10). They ended each series on the road, all on their first try.
Fittingly, they also won in come-from-behind fashion, just as they had to do in all four rounds.
The Capitals lost Game 1 of three of their four series and trailed 3-2 in the Eastern Conference Final against the Tampa Bay Lightning before winning Games 6 and 7 by a combined 7-0.
They rallied from down 2-1 and 3-2 in Game 5 to finish the job.
"We never make it easy, do we?" defenseman Matt Niskanen said. "But, man, what a group of guys and what a performance from a lot of individuals. We played together, showed a lot of character. That's something we got criticized for in the past. Boy, we showed a ton of it this spring."
[SHOP: Get your Capitals Stanley Cup Championship Gear]
The Golden Knights' historic inaugural season ended with their first four-game losing streak.
"I think people would have said we would have won 20 games this year, so to find ourselves playing for a Stanley Cup, it's pretty special, but just a little bit short," Vegas forward James Neal said. "But proud of the guys."
Nate Schmidt, David Perron and Reilly Smith scored, and Marc-Andre Fleury made 29 saves for Vegas, which lost three games in the first three rounds.
"We worked hard tonight, we competed hard, just couldn't beat that team," coach Gerard Gallant said. "They deserved the Stanley Cup."
Video: Dunkin Donuts Breakaways: Vrana puts one in the attic
The Smith-Pelly and Eller goals each came off a Golden Knights turnover in their own zone.
"We left our goalie out to dry," Vegas defenseman Deryk Engelland said.
Smith-Pelly scored while falling into the right face-off circle after kicking the puck to his stick.
It was his third goal in as many games and his seventh in 24 NHL playoff games. He scored seven goals in 75 regular-season games.
Eller scored the winner from the slot, shoveling the puck into the net after it got behind Fleury, who made the initial save on Brett Connolly's shot.
"[Fleury] was so far out I couldn't get in front of him, which is usually where the rebound comes," Eller said. "So I got behind him and the puck just squeaks through. Usually, Connolly shoots between the legs, and it was just at the right place at the right moment."
Vegas scored twice in the final 7:04 of the second period to take a 3-2 lead.
Perron tied it 2-2 at 12:56 after he was pushed into the net by Washington defenseman Christian Djoos. The Capitals challenged for goalie interference, but the goal was upheld after video review when it was ruled that Djoos caused Perron to contact Holtby before the puck crossed the goal line.
Smith gave Vegas a 3-2 lead with a power-play goal at 19:31.
Washington took a 1-0 lead on Vrana's breakaway goal at 6:24 of the second. The Golden Knights tied it 1-1 at 9:40 when Schmidt's shot deflected in off Niskanen's right skate.
Ovechkin gave the Capitals a 2-1 lead with a power-play goal at 10:14.
"I can't explain what I feel," Ovechkin said. "It's unbelievable."
Video: WSH@VGK, Gm5: Ovechkin on winning the Stanley Cup
Goal of the game
Smith-Pelly's goal at 9:52 of the third period.
Video: WSH@VGK, Gm5: Smith-Pelly ties it while falling down
Save of the game
Holtby stopping Tomas Nosek at 1:18 of the third period.
Video: WSH@VGK, Gm5: Holtby uses pad to turn aside Nosek
Highlight of the game
Eller's goal at 12:23 of the third period.
Video: WSH@VGK, Gm5: Eller puts Capitals ahead in the 3rd
They said it
"It was like we were a bunch of 10-year-olds that just won their first hockey tournament. It was like we were a bunch of little kids again. Amazing. Amazing." -- Capitals defenseman Matt Niskanen
"You don't want to finish on a note like that, necessarily. But one thing I know: We'll be back." -- Golden Knights forward Jonathan Marchessault
"I just knew once we got the lead this group was not letting go. This group got angry and mean, and they said, 'It ain't happening.'" -- Capitals coach Barry Trotz
Video: WSH@VGK, Gm5: Trotz on the Caps' first Stanley Cup
Need to know
John Carlson had an assist on Ovechkin's goal, giving him 55 points (18 goals, 37 assists) in the NHL playoffs, the most by a Capitals defenseman. … Eller is the first Denmark-born player to win the Stanley Cup. … Washington center Evgeny Kuznetsov led the NHL with 32 points (12 goals, 20 assists) in the playoffs. He is the third Russia-born player to do so since 1943-44. (Sergei Fedorov, Red Wings, 1995; Evgeni Malkin, Pittsburgh Penguins, 2009 and 2017). … Ovechkin passed John Druce for most goals for the Capitals in a single postseason. Druce had 14 in 15 games in 1990. Ovechkin's previous high was 11 in 14 games in 2009.
Video: Capitals win Game 5 to secure first Stanley Cup title