Braden Holtby made 30 saves in regulation and overtime, and stopped three of four Rangers in the shootout as the Capitals extended the streak that started with wins on consecutive nights against the Jets in Winnipeg.
The playoffs, which seemed to be slipping away, are now a realistic goal. The Capitals are only two points behind the Rangers, who are in eighth place in the Eastern Conference.
"This is what we've got to do, if you're going to fight for a playoff spot," Backstrom said. "We've got to keep working every game. We're playing better. We're moving the puck better. Tonight we found a way to win this one after they came back and tied it."
Ovechkin scored in the second round of the shootout, only to see Stepan tally for New York to knot it at 1-1 after three rounds.
After Holtby denied Brad Richards, Backstrom beat Lundqvist to decide the contest in the fourth round.
Even the Rangers gained something in this one. With the point, New York moved up one position in the congested Eastern Conference. They have 33 points, one more than the idle Carolina Hurricanes, who have played one less game.
The Capitals dominated early before the Rangers took charge late as the teams deadlocked at 2 after one period.
Backstrom and Ovechkin staked Washington to a 2-0 lead.
Backstrom got a power-play tally at 7:54 on a fluky play. Ovechkin fired a shot from the left circle deflected by a Rangers defender into Lundqvist. The puck popped into the air and deflected off Backstrom's chest. The goal was confirmed by a video review.
Ovechkin extended his goal-scoring streak to five games at 9:45, deflecting Steven Oleksy's point shot for his 16th goal.
"It was a really weird game," Backstrom said. "The first 15 minutes we played really well. Then we got a little sloppy."
The Rangers happily took advantage.
The momentum shifted as the Rangers got a goal from an unlikely source when Asham snapped a shot past Holtby's glove to put New York on the board at 14:12. He had missed the 15 previous games with a back injury.
"It seemed to get the bench going and it started to get the team rolling," Asham said. "They took a couple of penalties and our power play got us back into it. It's just too bad we couldn't finish it off."
The Rangers cashed in on a 5-on-3 advantage for the equalizer at 18:03 as Stepan scored from a sharp angle to Holtby's right.
There were fewer scoring chances in the scoreless second period.
Washington squandered a 5-on-3 early in the period and Holtby stopped Marian Gaborik's breakaway bid midway through.
The Capitals came close in the last minute when Mike Ribeiro blasted a shot off Lundqvist's mask that staggered the Rangers netminder and the follow-up hit the crossbar.
In the third, Rangers captain Ryan Callahan hit the post early on, while the Caps' Marcus Johansson completely missed the net on a rush down the left wing after stripping the puck from Rangers defenseman Dan Girardi.
The Rangers pressed hard for the winner at the start of the extra period with Callahan testing Holtby. Then it was the Caps turn at the other end as Lundqvist stood his ground when Ovechkin cut to the net.
That set the stage for the shootout where Backstrom solved Lundqvist to secure the win.
"He's good when you try to dangle him," Backstrom said. "I just found a spot there. I was lucky, maybe."
Lundqvist put the blame for the loss squarely on his shoulders.
"I only stopped two of four in the shootout. I have to be better," Lundqvist said. "I think the last one was a really good shot but Ovechkin, I felt like I had him but I didn't get the stick down."
The Rangers assigned D Stu Bickel to Connecticut (AHL). ... The Rangers wore their heritage jerseys, while the Caps donned their retro jerseys. ... It was the Capitals first shootout of the season; the Rangers are 3-3.