Michael Frolik and Johnny Gaudreau scored, and Mike Smith made 26 saves for the Flames (16-13-3), who are 2-3-2 in their past seven games.
"We should have gotten points tonight," Calgary coach Glen Gulutzan said. "It was a hard-fought game both ways. They're a good team."
The Flames are 8-9-0 at home.
"We're in a hockey game tonight, another close one, and in close ones you can't have [mental mistakes]," Smith said. "It came back to bite us tonight."
Donskoi poked in a loose puck behind Smith to make it 3-2 after Gaudreau scored to tie it 2-2 at 7:39 of the third.
"It was the kind of goal we needed at that point," Donskoi said.
The Sharks are 11-0-0 when leading after two periods.
"The leadership we have in this group really helps us bear down and close games out," Dell said. "I think the experience we have … the guys know how to win and know how to teach the young guys how to win, too."
Frolik put Calgary up 1-0 at 4:42 of the first period when he stole a pass by Tim Heed inside San Jose's blue line and scored between Dell's legs.
Meier tied it 1-1 at 16:07 of the first, after Donskoi stripped the puck from Micheal Ferland in the neutral zone.
Tierney, who assisted on Meier's first-period goal, put San Jose up 2-1 with a power-play goal at 10:00 of the second period. He is tied with Donskoi for second on the Sharks with eight goals, after scoring 11 in 80 games last season.
"I think he's really stepped up," Donskoi said. "He's more creative offensively, I think. He's always been responsible defensively. He's one of the biggest penalty-kill guys for our team. I knew he has that skill. He can make plays. He has really good playmaking skills. This year he's been really picking it up."