Connor Brown, Mikkel Boedker, Anthony Duclair and Brady Tkachuk scored for the Senators, who hadn't beaten the Islanders since Dec. 1, 2017.
"(Anderson) was good," Senators head coach D.J. Smith said. "We hung up out there in Pittsburgh. We don't have a lot of home games left and there was a crowd there, guys were pumped up wanting to win and (Anderson) held us strong and gave us an opportunity to win.
"We had some guys who played hard. That's a really good hockey team, but ultimately (Anderson) was the difference (Thursday)."
Pageau was making his return to Ottawa after being traded to the Islanders 11 days ago. Hours after the trade, Pageau signed a six-year contract extension. In five games with the Islanders, Pageau has two goals.
"It's disappointing to obviously lose this one," Pageau said. "We need all the points right now and we need to find our game as fast as we can. I think we need more urgency in our game."
Pageau, an Ottawa native, was given a video tribute during the first television timeout and fans were quick to start chanting his name, as they often did when he scored. The 27-year-old went for a quick skate near the bench to acknowledge the reception.
"The appreciation from the fans, my ex-teammates on the bench was really touching," Pageau said. "There was a lot going through my mind and I was trying to stay focused on the game. Obviously, I can thank everyone now and turn the page and focus on the rest of the season here."
Anders Lee, Mathew Barzal and Ryan Pulock scored for the Islanders, who are 0-3-2 in their last five games. The Islanders have been outscored 14-5 in the last three games. Semyon Varlamov stopped 25 shots.
The Islanders had the lead twice, but failed to hold on. New York also hit three posts in the game.
"It's really disappointing," Islanders coach Barry Trotz said. "I don't want to take nothing away from the Senators, they played a very hardworking, north game and capitalized on the chances we gave them and we didn't capitalize enough on ours."
In the third period, the Islanders were pressing for a tying goal, but the Senators took a 4-2 lead with just over three minutes remaining as Tkachuk picked up his 20th.
New York made it a one-goal game 65 seconds later when Pulock beat Anderson.
The Islanders fired 18 shots at Anderson in the second period, but trailed 3-2 after 40 minutes.
New York took a 2-1 lead early in the second when Jordan Eberle dropped a pass to Barzal, who fired a wrist shot from the slot.
The Senators tied the game as Boedker scored short-handed. Ottawa leads the league with 15 short-handed goals this season.
Duclair gave Ottawa its first lead of the game when he beat Pageau for positioning and scored a pretty goal high on the short side at 14:26 of the second.
The Islanders opened the scoring with a power play when Lee netted his 20th of the season, going top shelf on Anderson at 3:58 of the first.
Ottawa tied the game as Brown tucked in a Nikita Zaitsev rebound at 13:57.
Ottawa's Anthony Duclair returned to the lineup after missing the last four games. Artem Anisimov is out with an upper body injury.
Islanders: Host Carolina Hurricanes on Saturday.
Senators: At San Jose Sharks on Saturday.
More AP NHL: https://apnews.com/NHL and https://twitter.com/AP-Sports
Senators comeback to beat Islanders
The Senators rally in the second period as they come from behind to beat the Islanders 4-3.