Bracken Kearns scored his first NHL goal and Logan Couture netted his 100th for the Sharks, who moved within five points of their California rivals.
In other key games, St. Louis likewise closed the gap on Chicago in the Central Division by beating Dallas in overtime, Pittsburgh widened its already big lead in the Metropolitan Division by defeating Columbus, and Winnipeg beat slumping Colorado in overtime.
The Sharks won their fourth straight, with Brent Burns also scoring and goaltender Antti Niemi stopping 30 shots.
Patrick Maroon scored for the Ducks, who missed a chance for a club-record, seven-game winning streak on the road. Anaheim also failed to extend a run of 13 games with at least one point.
St. Louis' Kevin Shattenkirk scored a power-play goal 4:49 into overtime to give the Blues a 3-2 win over Dallas.
Jaden Schwartz had a goal in his fifth straight game, and T.J. Oshie also scored for the Blues, who improved to 12-0-1 against Central Division opponents.
Dallas overcame a 2-0 deficit, and earned a point, with second-period goals by Jamie Benn and Ryan Garbutt.
The win moved St. Louis within four points of idle Chicago.
Pittsburgh's James Neal had a hat trick and two assists to lead the Penguins to a 5-3 win over Columbus.
Sidney Crosby scored the go-ahead goal and set up two other tallies while Chris Kunitz added his 21st goal of the season and two assists for Pittsburgh, which has won all four meetings with Columbus this season and moved 14 points clear atop the Metropolitan.
Brandon Dubinsky, Corey Tropp and Nikita Nikitin scored for the Blue Jackets before their biggest home crowd of the season, 18,871.
Winnipeg's Blake Wheeler scored at 4:58 of overtime to give the Jets a 2-1 victory at Colorado.
Andrew Ladd also scored for Winnipeg while Wheeler won it with the overtime tally, extending his fine December in which he has scored 10 goals and had four assists.
Nathan MacKinnon scored for Colorado, which has lost four straight — three after regulation.
New York's Henrik Lundqvist made 37 saves in his first start in four games, helping the Rangers edge Tampa Bay 4-3.
Lundqvist was recalled to the starting job after a poor run of form saw him replaced for three games by Cam Talbot.
Mats Zuccarello had a goal and two assists while Rick Nash, Chris Kreider and Benoit Pouliot also scored for the Rangers, who had three power-play goals.
Tampa Bay got goals from Tyler Johnson, Ondrej Palat and Valtteri Filppula.
Vancouver's Jannik Hansen scored the opening goal, and rookie goalie Eddie Lack made 18 saves to lead Vancouver past Calgary 2-0.
Florida's Brian Campbell, Aleksander Barkov and Dmitry Kulikov all scored in the Panthers' 4-1 win over Montreal.
Toronto's Phil Kessel scored twice, reaching the 20-goal mark for the sixth straight season, to help the Maple Leafs top Carolina 5-2.
New York's Kyle Okposo scored twice midway through the third period as the Islanders overcame a three-goal deficit to beat Minnesota 5-4.
Buffalo's Ryan Miller made 49 saves to carry the Sabres to a 2-1 shootout win over Washington.