WASHINGTON — From period to period, this season, the Rangers have seemed like vastly different teams. The structure crumbles after a good defensive or offensive 20 or 30 minutes.

That was the case again in the 5-2 loss to the NHL-leading Capitals on Sunday, allowing two early power-play goals and Justin Williams’ hat trick at even strength, as the Blueshirts failed to gain any momentum in another bid to string two victories together. They haven’t accomplished that since Nov. 21-23, and concluded this three-game road trip 1-2.

“Special teams is a huge part of the game, but every play is a big play,” defenseman Dan Girardi said. “All these small plays that we’ve been doing for the last couple years, it just feels like we’ve been getting away from ourselves. In the past when we make a mistake, I feel like we get out of there, it’s not killing us . . . Now one mistake turns into two or three. No one’s pointing fingers, but we’ve got to string some wins together here.”

The Capitals, leading 3-2 after 40 minutes at Verizon Center, where they have won 12 straight games, put the match away early in the third, when J.T. Miller, along the boards in his own zone, flung an unnecessary pass into the middle that was intercepted. Williams, alone in front, easily buried his second past backup Antti Raanta, playing his first game in a month, to extend the lead to 4-2 with 4:51 gone. The Rangers never got closer. Williams completed his hat trick into an empty net at 18:09, when his long wrister bounced in off Derick Brassard’s skate.

“I don’t think we were giving them an overly amount of chances,” Marc Staal said, noting the Capitals had 24 shots, “but the one chance they’re getting, it’s a backdoor tap-in or a play were we don’t give our goalie a chance to block it.”

After a solid defensive effort by the Rangers (24-16-5, 53 points) in the first period, the Capitals scored two goals in 1:02 of the second period to take a 3-1 lead. Chris Kreider scored the opening goal at 10:17, but the Capitals (34-8-3, 71) scored the next three, two on the power play — from Alex Ovechkin and Marcus Johansson — when the Blueshirts lost their way, leaving the Caps open often, and seemed a step behind.

The Rangers have allowed 12 power-play goals in the last 11 games.

“It’s been probably the most frustrating thing, the penalty-killing,” Ryan McDonagh said. “That’s been a strong suit of us for as long as I can remember. For some reason, we’re letting the opposition dictate the plays, the pace. We’re trying to get all four guys on the same page. We’ve got to figure it out because it’s changing momentum of games, like in Philadelphia, and in this game, it gave them a lot of life.”

With 2:18 left in the second, after Kreider scored his second goal, and third in the past two games, to cut the lead to 3-2, starting goaltender Braden Holtby went to the dressing room and was replaced by backup Phillip Grubauer. The team said Holtby was suffering from dehydration. But the Rangers, in their third game in four days, couldn’t dent Grubauer, as the Capitals won their third in a row against the Blueshirts.

“We need guys to make a handful of plays. It’s a fine line for us right now,” McDonagh said.