The Sharks' Joe Pavelski had forged a 1-1 tie with a score 6:49 into the middle period, but the Eckholm responded just 29 seconds later when his backhand shot from the right circle tipped off a Shark defender and into the net.
Mazanec made 26 saves as Nashville broke a three-game losing streak.
David Legwand provided a goal and an assist, and Roman Josi also scored for the Predators.
Senate Democrats to pull all-nighter on climate change
Susan Sarandon 'very excited' about daughter's pregnancy