Brayden Point tied it 1-1 with a power-play goal at 14:09, scoring on a shot from the left post.
Meier made it 2-1 on a snap shot from the slot 51 seconds into the second period.
"In that second period, we had a bad line change and it goes in and now we're at that point, 'Are we going to sink or swim?'" Cooper said. "And the boys dug in, got the big lead and hung on."
Hedman tied the game 2-2 at 7:34, scoring on a wrist shot from low in the left face-off circle.
Hagel scored his first of the game to put the Lightning in front 3-2 at 9:27. He then made it 4-2 off a rush at 13:01 before extending it to 5-2 on a rebound in the slot at 15:53.
"[Hagel's] unbelievable," Cirelli said. "You see just the way he scores his goals, the way he makes plays, how good he is in the defensive zone. He's a guy that does it all for us."
Two of Hagel's three career hat tricks have come against New Jersey.
"I was thinking about that after the game," Hagel said. "I know I had another one against them. I don't know, I guess they're just my team and hopefully it stays that way. We'll see the next game."
Hedman scored his second of the game on a slap shot from the point to make it 6-2 at 17:28.