Gilbert beat Senators netminder Craig Anderson with a one-timer on a pass from Tomas Fleischmann at 17:28 of the third period with only two seconds remaining in a high-sticking penalty to Senators forward Jean-Gabriel Pageau.
One minute later, with the Senators on a power play, Erik Karlsson fell in the Panthers' zone allowing Kopecky to break out 2-on-1. He elected to shoot and beat Anderson at 18:19 with the insurance goal.
Both teams took turns taking and giving away the lead through the first two periods, starting with the Panthers.
Jimmy Hayes opened the scoring with his fourth goal of the season as he beat Anderson from the right hash mark at 5:39 of the first period.
After a review to see if the puck was kicked in, Neil was credited with the tying goal at 9:17 of the period. Clarke MacArthur took the original shot but after Clemmensen made the save the puck bounced in of Neil's skate for his fifth goal of the season.
The Senators took the lead in the final minute of the period when Spezza made a sensational play, first getting the puck around Panthers defenceman Dylan Olsen at the face-off circle then beating Clemmensen high and on the short side with very little space.
It was Spezza's 11th goal of the season and first in his past 13 games.
Barkov tied the game for the Panthers at 17:11 of the second period with his sixth of the season when he redirected Gilbert's shot past Anderson.
The Senators were also forced to play the final two periods without forward Mika Zibanejad who left after only five shifts and 2:38 of ice time with an upper-body injury.
Notes- Defencmen Patrick Wiercioch and Eric Cryba, along with forward Cory Conacher were scratches for the Senators. Defenceman Mike Mottau and forward Scott Gomez sat for the Panthers ... The Ottawa Senators have allowed 42 first-period goals this season, the most in the NHL. Going into Thursday, the Senators had the most penalty minutes in the league with 164 and were only 24th with a 78.9 per cent efficiency on the penalty kill.