Jakob Silfverberg scored at 38 seconds to hand San Jose its fifth straight loss (0-4-1), its longest losing streak since six in a row from March 16-25, 2017.
"The one point is huge, but I thought we played well enough to get the two," Sharks defenseman Justin Braun said. "They were opportunistic and buried a few of their chances, and you come away with just one."
[WATCH: All Sharks vs. Ducks highlights]
Rickard Rakell had two goals and one assist, and John Gibson made 23 saves for the Ducks (31-36-9), who moved eight points behind the Minnesota Wild for the second wild card into the Stanley Cup Playoffs from the Western Conference.
Kevin Labanc, Timo Meier and Braun scored, and Aaron Dell made 17 saves for the Sharks (43-23-9), who are four points behind the Calgary Flames and six points ahead of the third-place Vegas Golden Knights.
"I thought the guys that dressed tonight gave us everything they had," Sharks coach Pete DeBoer said. "Showed up, played hard, played well defensively, and created enough opportunities to win a game."
Video: SJS@ANA: Rakell nets PPG for second of game
Braun, playing his 600th NHL game, tied the score 3-3 with 2:40 left in the third period off a rebound that had come off the end boards. It was his second goal of the season and first in 43 games.
Rakell scored a power-play goal with 4:55 left to give Anaheim a 3-2 lead.
Timo Meier scored his 28th goal of the season on a power play to tie the game 2-2 at 6:29 of the third period.
Joe Thornton took a slap shot from the left circle that squeezed through the left arm and body of Gibson, and Meier was in position to push the puck across the goal line.
Brent Burns assisted on the goal, giving him an NHL career-high 77 points and breaking his team record for points by a defenseman set in 2016-17.
"We were in it the whole game," Sharks forward Logan Couture said. "A few plays here or there, a few chances we could have scored on when we had the opportunity and it would have been a different story."
That was the only goal in five power-play opportunities for the Sharks.
"We took a few too many penalties in this game, but at the same time, most of the time, our PK units weren't giving them anything," Rakell said. "It feels good to beat them."
Anaheim had taken a 2-1 lead on a power-play goal by Adam Henrique at 2:41 of the third. Henrique redirected a centering pass from Troy Terry through Dell's pads.
"We need to do a better job of getting those second and third opportunities on the power play," Henrique said. "Tonight we did a better job of getting to the corners, winning second pucks back, and that's where we end up getting some more chances."
Rakell gave the Ducks a 1-0 lead at 7:58 of the first period.
Burns turned the puck over in the defensive zone and Ducks forward Ryan Getzlaf made a quick pass to Silfverberg coming down the right side. Silfverberg passed to a trailing Rakell, and he scored on a wrist shot from just above the right circle.
"It feels good when you get to score pretty early in the game," Rakell said. "After that we kept coming throughout the whole game. We created scoring chances and put pressure on them."
Kevin Labanc made it 1-1 at 2:29 of the second period.
San Jose defenseman Tim Heed trapped the puck inside the Anaheim blue line and passed to Marcus Sorensen in the middle. Sorensen passed to Marc-Edouard Vlasic, who skated along the wall before making a short pass to Labanc at the left face-off dot
"Close game going into the third," DeBoer said. "I didn't think we gave them very much. The chances they got they stuck in the net though."
Video: EA Sports OT Winner: Silfverberg wins for the Ducks
They said it
"We were great 5-on-5 tonight. We got the puck deep and we were grinding. That fourth line, I think they were in their zone the whole night. We need more of that going forward and we can dominate teams down low." -- Sharks defenseman Justin Braun
"We're doing a good job of getting pucks to nets, and bodies. We're getting rewarded and its creating confidence within the team." -- Ducks forward Jakob Silfverberg
Need to know
Bruan scored the 266th goal of the season for San Jose, breaking the team record set in 2005-06. ... The last time the Ducks played beyond regulation was a 4-3 overtime loss at the Winnipeg Jets on Jan. 13. ... Silfverberg's game-winner was his 23rd goal of the season, tying his NHL career high (2016-17). He has 13 points (seven goals, six assists) in the past 11 games. ... Getzlaf has eight points (two goals, six assists) in the past seven games.
Sharks: Host the Detroit Red Wings on Monday (10:30 p.m. ET; SNE, SNO, SNP, NBCSCA, FS-D, NHL.TV)
Ducks: At the Los Angeles Kings on Saturday (10:30 p.m. ET; FS-W, PRIME, NHL.TV)
Video: Rakell scores twice, Silfverberg wins it in OT