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.
Ray Liotta sues skin care company over use of likeness
Millions of Getty images now available for free via embed tool