Florida's Mike Hoffman scored a power-play goal 36 seconds into the third to tie the game 4-4.
Vilardi scored on his first NHL shot when he beat Bobrovsky with a wrist shot from long range. The goal was set up by Kurtis MacDermid stealing the puck from Mark Pysyk in the neutral zone.
"Feels awesome," Vilardi said. "Feels great. First shift, I got pretty lucky."
Kings coach Todd McLellan said he was impressed by how calm Vilardi was in 15:10 of ice time, especially in the face-off circle, where he was 13 of 16 (81.3 percent).
"Sometimes, I think when a player starts his career out, he's just flying all over the place without any type of purpose," McLellan said. "Gabe had purpose in all of his shifts, and he did a good job."
Barkov tied it 1-1 at 7:03, and then put the Panthers up 2-1 at 8:43 with a wrist shot from the high slot.