Kane tied it 1-1 at 12:39 with a spinning shot from the right face-off circle.
Burns made it 2-1 at 13:42 when he blocked Rittich's clearing attempt above the right circle and scored into the open net.
Hertl deflected the first shot Smith faced to put the Sharks up 3-1 at 14:04. Hertl has eight points (five goals, three assists) in the past four games.
"We thought we'd compete hard and see what happens, see how the game develops," Sharks captain Joe Pavelski said. "It was nice getting the lead and kind of answering. They scored early, and we answered, getting back into that game and playing with the lead."
Kane scored on his own rebound to make it 4-1 at 16:27 of the second period. It was his ninth goal in five games against the Flames since joining the Sharks in a trade from the Buffalo Sabres on Feb. 26, 2018.
"He's been so dominant against these guys at times," Pavelski said. "It's good to see. When you've got a player that's hot against a team, it's good to see him stay hot and give our team a little boost. He did a good job."
Brodie cut the San Jose lead to 4-2 1:15 later with a point shot through traffic on the power play at 17:42.