John Carlson had a goal and two assists in a 3:01 span in the first period, and Braden Holtby made 23 saves for the Capitals (20-4-5), who have won four games in a row and are 13-2-2 since Oct. 25.
"It's tough to be as complete as we were out there," said Carlson, who reached 40 points (nine goals, 31 assists), becoming the first NHL defenseman to do so in his team's first 29 games since Al MacInnis had 41 for the Calgary Flames in 1990-91.
WATCH: [All Capitals vs. Sharks highlights]
Melker Karlsson and Evander Kane scored for the Sharks (15-13-1), who lost for the first time in three games and second in their past seven. Martin Jones allowed five goals on 23 shots before being relieved to start the third period by Aaron Dell, who made five saves.
"Disappointing," Jones said. "We were a little flat. We just didn't have the jump."
San Jose coach Peter DeBoer said: "We've got to be better. That's the best team in the League, or one of the top two teams in the League, and you've got to bring your best game to beat them. I liked our start."
Hathaway scored his second of the night at 2:31 of the second period to give Washington a 4-1 lead before Vrana made it 5-1 at 16:15 with his second.
"We got the start we wanted even though they scored first," Capitals forward Carl Hagelin said. "Momentum shifts are a big thing in this game, and we're real good at turning the momentum around. Our team doesn't get too high or too low, so sticking to a game plan really works for us."