Carl Hagelin, J.T. Miller and Martin St. Louis scored for New York (42-17-7), which has won 12 of its past 15 games overall (12-1-2) and 18 of 22 against divisional opponents (18-3-1). Goaltender Cam Talbot made 28 saves, including 16 in the third period.
"Our work [ethic] has been there," St. Louis said. "I think we're getting some great plays from different lines at good times, and that's how you keep winning games. It's never the same guys. I think that's the reason why we've got some consistent success."
The Rangers (91 points) lead the New York Islanders by one point for first in the Metropolitan Division, and they have three games in hand.
The Capitals (82 points), fourth in the Metropolitan Division, lead the Boston Bruins by four points for the first wild card into the Stanley Cup Playoffs from the Eastern Conference.
"I don't look at it as a discouraging loss at all," Capitals coach Barry Trotz said. "I look at it as here's a team that's … I think they're tied for the first overall [spot] in the National Hockey League. I don't think we should be shy of them. I respect that they're a very good team and I thought we played them pretty even up. We did make some mistakes, and they did capitalize on a couple things, but it definitely wasn't a one-sided game.
"We learned some things today. They probably learned some things about us, but we learned a lot about them and a lot about ourselves. We've got to go a couple more times at each other, so I'm sure it'll start to heat up."
The Capitals and Rangers will play each other two more times this season, on March 29 and April 11.
In a physical first period, Hagelin jump-started a rush, then scored at 8:20 to give New York a 1-0 lead. Holtby saved Hagelin's first shot from near the right circle, but as the puck caromed through the zone, it ultimately ended up back on Hagelin's stick on the weak side. Holtby, sliding in the opposite direction, could not stop Hagelin from knocking the puck into the net.
Ovechkin tied the game on the power play at 11:43 with his NHL-leading 45th goal. Rangers forward Jesper Fast blunted Ovechkin's one-timer from the slot with the blade of his stick, but the puck's change of direction fooled Talbot.
The Rangers reclaimed the lead at 2-1 when Miller beat Holtby with a wrist shot at 16:34. Capitals defenseman Tim Gleason's defensive-zone giveaway as he attempted to chip the puck off the glass led to Miller's seventh goal, which was set up by a pass from Kevin Hayes.
"I don't know if they were bounces, or it just seemed the puck was bouncing like crazy and ending up on their stick for the first two periods somehow," Holtby said. "The first [goal], obviously, it was just a scramble play, they just kept being persistent. The second one, it's just an unlucky play off the stanchion, and [they] make a great shot.
"Those plays, they're going to happen. I thought we battled through it fairly well, but we still need to find a way to play 60 minutes completely."
On a two-man advantage that carried over from the first period, Talbot robbed Nicklas Backstrom with a glove save on a shot from in close. Video review upheld the call, determining that Talbot's glove did not cross the goal line.
"[Talbot] made some unreal saves," Rangers coach Alain Vigneault said. "He made four brilliant saves that were Grade A and kept us right there, and we were able to [pull] it off."
Searching for the tying goal, the Capitals were more aggressive offensively in the third period. Their 16 shots were three more than in the first two periods combined.
"You want to play at a high tempo," Rangers defenseman Marc Staal said. "You want to play in their end, but you don't want to take any unnecessary risks, and I thought we did a pretty good job of keeping them to the outside.
"A lot of their shots were from the point or from the wing. [Washington] had a few good chances at the end in tight, but that's going to happen, and [Talbot] made some big saves for us. In that type of game, in a back-to-back, that's what you need from your goalie, and he delivered."
The Rangers are first in the Eastern Conference and NHL. The Montreal Canadiens, Nashville Predators and Anaheim Ducks each also have 91 points, but the Rangers have played fewer games than all three.