Brent Burns' power-play goal with 2:52 remaining rallied San Jose from a two-goal deficit as the Sharks scored three straight goals during the last eight minutes to beat the Predators 5-4.
''They had a two-goal lead, but you've got to keep playing,'' said Pavelski, San Jose's first-line center. ''We've been on the other end of that already this year, so there's always time. Especially (since) we're a depth team and we've been rolling four lines, and guys are fresh in the third (period).''
Burns' one-timer from the left faceoff circle beat Juuse Saros high to the glove side for the winning goal.
''Dilly makes that play and sparks us and that's what you need on the road at times,'' Pavelski said. ''That goal really kind of gave us a boost.''
Nashville's Viktor Arvidsson had two goals and one assist.
Arvidsson and Craig Smith scored twice in a nine-minute span late in the second period to give Nashville a 4-2 lead.
Filip Forsberg also scored for the reigning President's Trophy winners.
Nashville fell to 8-2-0 and San Jose improved to 5-3-1 in a matchup of Western Conference contenders.
''It was a big gut-check for us,'' Sharks coach Peter DeBoer said. ''I think we talked between the second and third about coming out and being a little harder around both nets, and that commitment paid off. But I like the fact that we have the ability to quick strike and create offense like that.''
San Jose's Martin Jones earned the win with 25 saves.
Nashville goalie Juuse Saros, making the first back-to-back start of his young career, fell to 4-1-0 after making 27 saves.
He's filling in for last year's Vezina Trophy winner, Pekka Rinne, out with an undisclosed injury.
''We've been in that situation an awful lot and been able to close out games,'' Predators coach Peter Laviolette said. ''I think more than anything we shot ourselves in the foot. You knew that they had a good power play, you knew they were a group that is dangerous.''
San Jose's first and last goals came on the power play.
Smith increased the Predators' lead to 4-2 when he ripped a wrist shot into the top left corner of the net with 15 seconds left in the second period. Arvidsson set him up on a 2-on-1 breakaway with a pass that found Smith alone at the bottom of the right faceoff circle.
Arvidsson's second goal put the Predators back on top 3-2 when his low snapshot went past Jones' outstretched glove at 10:45 of the second period. Forsberg found his linemate in the low slot from behind the goal line with a perfect pass.
''It was not good and it can't happen,'' Arvidsson said of the loss. ''We had a 4-2 lead and lost 5-4 - and that's too bad.''
Hertl's breakaway goal tied the score at 2 when he stuffed the puck past Saros stickside in front of the crease at 7:52 of the second period.
Nashville took a 2-1 lead when Forsberg swatted a rebound past Jones from the front of the crease 21 seconds into the second period. His sixth goal of the season came after he gobbled up a rebound of Ryan Ellis' shot from the right point.
Arvidsson tied it at 1 when he scored on a breakaway at 11:14 of the first period. He pounced on a loose puck at the Predators' blue line, skated the length of the ice, deked Jones and beat him with a backhander to the stickside.
San Jose got outshot in the early going, but still managed to strike first on Meier's power-play goal from the low slot at 6:58 of the first period. Nashville's Ryan Johansen was in the penalty box for tripping.
NOTES: Nashville called up G Troy Grosenick from Milwaukee (AHL) and sent G Miroslav Svboda back to the minors Monday. . San Jose called up C Dylan Gambrell from its AHL affiliate in San Jose Monday. . Sharks C Joe Thornton, 39, missed his seventh straight game with a right knee infection. ... Hertl led San Jose with five shots. ... Nashville had its 114th consecutive sellout (17,159) at Bridgestone Arena.
Sharks: Visit Carolina on Friday night in second game of three-game road trip.
Predators: Visit New Jersey on Thursday night before returning home Saturday.
More AP NHL: https://apnews.com/tag/NHL and https://twitter.com/AP-Sports
Copyright 2018 by AP. Any commercial use or distribution without the express written consent of AP is strictly prohibited.