Timothy Liljegren and Fabian Zetterlund scored, and Mackenzie Blackwood made 32 saves for San Jose (5-10-3), which has lost four of six (2-3-1) since a three-game winning streak from Oct. 28-31.
"We had a great start, a great first period. We did the things we talked about," Sharks forward Alex Wennberg said. "Obviously, the second period they get momentum. It's a couple of small mistakes and it's a really good team so obviously they're going to have the chance to score. In those situations when they get momentum, you play a little bit, safe isn't the right word but maybe smarter, maybe get the puck down deep. It felt like we gave them a little more momentum."
The Sharks took a 1-0 lead on Liljegren's goal at 2:51 of the first period. His shot from the point deflected off Vesey high in the zone and sailed into the net, going over both Sam Carrick and Carl Grundstrom in front.
"It was kind of flukey," Rangers coach Peter Laviolette said. "I mean, it deflected 90 feet away and kind of popped up over everything and went in. I don't think we gave up much, but we didn't get as much as we wanted offensively. I thought the second period we moved it better."
The Rangers cashed in at 11:41, when Zibanejad scored off a rebound on Fox's shot to tie it 1-1.
"It was just a big goal and that's what he's capable of," Laviolette said. "He's a guy that we count on to produce."
Vesey made it 2-1 at 13:15 of the second. He followed his pass to the net, got the puck back after it hit off Carrick in front and scored with a backhand from the slot.
Fox had a goal taken off the board at 14:32 because of a successful coach's challenge for goalie interference. Trocheck was ruled to have knocked Blackwood's stick out of his hands as he going to the front of the net, preventing the goalie from playing his position on Fox's shot.
Trocheck made up for it at 16:21, when he finished a pretty play from Panarin to make it 3-1.