Ivan Provorov cut the San Jose lead to 3-1 with a power-play goal 51 seconds into the third period, but Meier scored his second of the game at 1:36 to make it 4-1.
"We play great at home, and on the road, for some reason, we just can't play the same way," Provorov said. "And we've got to figure out quick what's happening."
Meier completed the hat trick at 12:52 to give the Sharks a 5-1 lead.
"You've got to bounce back, that's how the business is," Meier said. "Tonight was pretty good, but I know I can do more. Same as our team, we have to take more steps."
Patrick Marleau scored at 17:20 for the 6-1 final. Joe Thornton had an assist to tie Adam Oates for seventh in NHL history (1,079).