Tomas Kopecky and Brad Boyes also scored for the Panthers. Luongo made 26 saves, and allowed his first goal against the Sabres in more than three games, covering a span of 214 minutes and 21 seconds, including 91 shots, dating back to when Luongo played for the Vancouver Canucks.
The scoring drought for Buffalo against Luongo ended when Drew Stafford one-timed the puck past the goalie at 11:02 of the first to tie the game 1-all.
"It took a good play from Gretzky to carry the one-timer there," Luongo said jokingly. "It was a (heck) of a play by them and a (heck) of a shot. I'm sure they were happy to get one by me. We don't get extra points for shutouts. We got the two points."
Brian Gionta also scored for Buffalo and Michal Neuvirth stopped 34 shots.
The Panthers are 4-1-1 in their past six games and have won five in a row over Buffalo going back to last season.
Bjugstad gave the Panthers a 3-2 lead when a shot by Ekblad was blocked and he grabbed the loose puck in front and poked it in with 17 seconds left in the second. Bjugstad leads the Panthers with 11 goals.
"I just kind of stood in front and got lucky; it dropped right in front of me," Bjugstad said. "I'll take it."
Sabres defenseman Tyler Myers bumped into Neuvirth in traffic in front.
"They had a guy come in late with the shot and we got a little scrambly on the play," Myers said. "It was unfortunate I bumped into (Neuvirth) and they were able to find the puck."
Trailing 2-1, the Sabres tied it at 2 on Gionta's goal. Mike Weber shot from above the circle and Gionta tipped the puck past Luongo with 4:06 left in the second.
The Panthers took a 2-1 lead when Kopecky tipped in a shot by Ekblad at 12:55 of the second. The goal's was Kopecky's first since Jan. 4, 2014 against Nashville.
"It was getting a little heavy. I'm so happy it's over," Kopecky said of the scoring drought.
Florida took a 1-0 lead on Boyes' goal as he fired from the right circle and the puck went over Neuvirth's glove with 6:55 remaining in the first.
The Sabres have lost their past two games, after winning six of their previous seven. On Thursday, the Sabres lost 5-0 at Tampa Bay, but played much better on Saturday, according to coach Ted Nolan.
"Overall, I liked our game tonight; we competed, we worked hard," Nolan said. "We came up on the short end."
Notes: Bjugstad, who has three multi-goal games in his past 11, leads the Panthers with 11 goals and 17 points. ... Neuvirth made his first start since Nov. 18. Stafford missed the previous three games with a lower-body injury.