Danis was going for his first shutout of the season, and the team's first, but with 1:27 left in the game, Gregory Campbell redirected a shot into the net.
"All that matters to me is the win," Danis said. "I don't care if it's 3-1, 3-2, or 3-0, as long as we win."
Danis won his third straight, and his third this season. He was 0-5-1 before his run of success.
"I definitely feel more comfortable out there," Danis said. "I'm just trying to be more aggressive and make myself look bigger in net."
Mike Comrie, Bill Guerin and Kyle Okposo scored for New York.
Tomas Vokoun made 28 saves for Florida. The Panthers had won two straight.
"You'd like to say their goalie won the game, but he didn't," Florida coach Peter DeBoer said. "He played well, but they capitalized on their opportunities and we didn't."
The Islanders took advantage of a Florida mistake to open the scoring with 26 seconds left in the first period. Vokoun made a save on Doug Weight's shot, and then wrapped the puck around the net to defenseman Jay Bouwmeester. Comrie took the puck from Bouwmeester and quickly threw it into the open short side.
The Islanders killed a pair of double-minor penalties in the scoreless second period, with Danis stopping 12 shots.
"Our penalty killing stepped up tonight," Okposo said.
Guerin gave the Islanders a two-goal lead at 4:19 of the final period. He got a centering pass from Comrie, did a spin-o-rama in the slot and backhanded the puck past Vokoun.
Okposo scored for the fourth straight game at 11:02 on New York's fourth power play. He took Trent Hunter's centering pass and one-timed a shot into a hole on the right side.
"He's playing with the puck with confidence now," Islanders coach Scott Gordon said. "We're seeing him do more with the puck.
Not just tonight, but he's doing things that have opened my eyes that I didn't know was in his repertoire."
Florida coach Peter DeBoer pulled Vokoun with just under 5 minutes left in the game for an extra attacker, put him back in during a center ice faceoff, and then pulled him again. The closest the Islanders came was Blake Comeau hitting a post.
"It creates desperation for our club," DeBoer said. "We've picked up points in 10 of our last 12 games. You're going to have nights like this, and we have to bounce back."
Notes: The Islanders have had one previous three-game winning streak this season, from Nov. 13-17. ... The teams split the prior two meetings, with each winning at home. The series concludes Thursday night in Florida. ... The attendance at Nassau Coliseum was announced as 13,336.