Hagelin and Silfverberg scored soon afterward to finally give an Anaheim offence that has struggled for much of the season some breathing room.
Curtis Lazar scored for Ottawa, and Anderson turned away 34 shots.
Cogliano put the Ducks ahead 7:06 into the second period, reversing the momentum of a stretch that had been dominated by Ottawa. Anaheim capitalized when Kevin Bieksa broke up a promising sequence for the Senators and fed Cogliano, who broke to the other end of the ice to put a wrist shot under a sliding Anderson's right leg.
It was Cogliano's fourth goal of the season and broke a 17-game scoreless streak. Cogliano's 66th goal for the Ducks puts him alone in ninth place on the club's scoring list, breaking a tie with Matt Cullen.
The Senators tied it 1-1 off a brutal turnover by Ryan Getzlaf. Anaheim's captain attempted a blind, backward pass that was easily picked off by Lazar, gifting him an easy breakaway before notching his third goal of the season.
Ducks coach Bruce Boudreau apparently benched Getzlaf for more than 8 minutes after the giveaway. When he did eventually return to the ice, Getzlaf was centring Anaheim's fourth line.
Prior to Cogliano's goal, Ottawa looked more likely to be the first team on the scoreboard coming out of the first intermission. Clayton Stoner nearly backhanded the puck into his own goal on a Senators' power play, forcing Andersen to make a desperation save. Zack Smith grabbed the loose puck and tried for a wraparound, only to be denied by Hampus Lindholm.
Scoring chances in the opening period were few and far between, with one of the best coming in the first minute. Cogliano couldn't get a shot off on Josh Manson's terrific cross-ice pass and Nate Thompson was unable to jam the redirected puck in under Anderson. Getzlaf had a promising break that started in the Ducks' zone but was also unable to produce a shot.
Anaheim outshot Ottawa 12-9 in a period where bad feelings got the better of good hockey.
The chippiness really got going in the final minutes with Chris Neil pinning Corey Perry against the Ottawa bench and refusing to let him off the ice. A fight between Manson and Mark Borowiecki soon followed, with Manson landing two hard shots to the delight of the crowd before officials stepped in. That brawl in the final minute failed to relieve the tensions, with Ryan Kesler and Kyle Turris exchanging words and shoves as the period came to an end.
Pat Maroon and Neil also exchanged blows less than a minute after Lazar scored.
NOTES: Ottawa scratched G Andrew Hammond, D Jared Cowen, D Fredrik Claesson and F Alex Chiasson. Hammond (personal) left the team on Monday and could return as early as Thursday. ... Anaheim scratched D Korbinian Holzer and F Jiri Sekac. ... Ottawa will have two days off before facing Los Angeles on Saturday. ... Anaheim continues its eight-game homestand Friday night against Dallas.