Antti Niemi gave up all five goals on 31 shots to end an otherwise successful 5-1 road trip for the Sharks.
The Rangers countered with three goals in the final six minutes of the middle stanza, starting with Callahan's power-play tally. Anisimov scored at 16:42, and Callahan put in a backhand while falling to the ice with Sharks forward Andrew Murray draped all over him in the final minute.
New York blew a three-goal lead in the third period against Ottawa on Saturday, but Biron's seven saves in the final 20 minutes sealed Monday's win.
Callahan set up the game's first goal by finding McDonagh at the top of the left circle from behind the net for a quick snap shot at 4:46.
Stepan scored his first goal of the season off a nice feed from Brandon Dubinsky with 5:07 remaining in the opening stanza.
The Rangers lost in a shootout to the Senators on Saturday, two days after falling to Toronto in their home opener...New York went 2-for-5 on the power play, while San Jose did not score on its three chances with the man advantage.