Isac Lundestrom, Derek Grant and Greg Pateryn also scored for the Ducks, who won for the fourth time in 11 games. John Gibson made 23 saves and Hampus Lindholm had three assists.
''We came out with a little of an in-your-face attitude,'' Getzlaf said.
David Pastrnak scored his 20th goal for Boston, with 12 coming in 13 games this month. Taylor Hall added a power-play goal and Erik Haula scored late for the Bruins, who had gone 10-2 since New Year's Day.
Boston netminder Tuukka Rask struggled, stopping 22 shots. It was his first time making two straight starts since re-signing with the team after offseason hip surgery.
Rask has played poorly in two of his four starts.
''Obviously, you don't expect it. You're a proud player and you set your expectations high,'' he said. ''Obviously, I haven't been good enough.''
Boston coach Bruce Cassidy thinks it will take a while for Rask to get his timing back.
''He's not where he needs to be,'' Cassidy said. ''I think that's evident and we didn't think he would be. You need seven, eight games.''
Anaheim coach Dallas Eakins missed his second consecutive game after he tested positive for COVID-19. Assistant coach Geoff Ward ran the team.
It was the Ducks' second straight win after losing four straight.
''When you're sick of losing, you find a way to win hockey games,'' Ward said.
With Oskar Steen off for boarding - a penalty that was switched from a major to a minor after a video review - Grant gave Anaheim a 1-0 edge when he tipped Getzlaf's shot from the right point midway into the opening period.
Rask gave up a soft short-handed goal when Lundestrom skated down the right wing, cut toward the net and slid a seemingly harmless backhand that slipped between the goalie's pads 1:28 into the second.
''Just a terrible goal,'' Rask said.
Pastrnak then one-timed Tomas Nosek's cross-ice pass by Gibson from the left circle, slicing it to 2-1 at 7:47. Getzlaf fired a wrister over Rask's right shoulder from the left circle just more than three minutes later.
There was a slight smattering of ''We Want Swayman!'' from the crowd that echoed around the balcony, referring to promising young goaltender Jeremy Swayman, who was sent to the AHL when the Bruins re-signed Rask.
''Tuukka's been off for a while. I don't think there's any scouting reports right now,'' Getzlaf said.
Hall redirected Brad Marchand's pass into the net from the edge of the crease with just more than four minutes left in the second.
Terry and Pateryn put it away with third-period goals.
NOTES: Pastrnak reached 20 goals for the sixth consecutive season. . Gibson tied Jonas Hiller for third-most wins in club history with 162. . Boston defenseman Mike Reilly returned from COVID-19 protocol. . Bruins defenseman Charlie McAvoy was whistled for hooking 44 seconds into the game. ... Boston forward Nick Foligno left the game with an undisclosed upper-body injury after a second-period fight against Sam Carrick.
Terry and defenseman Cam Fowler both returned from COVID-19 protocol, but backup goalie Anthony Stolarz and defenseman Josh Manson remained in protocol. Anaheim forward Sonny Milano missed his fourth straight game with an upper-body injury.
ON THE ROAD AGAIN
Boston closed a seven-game homestand 5-2.
Ducks: At Toronto on Wednesday night in the second stop on a five-game road trip.
Bruins: At Colorado on Wednesday, the opener of a three-game trip.
More AP NHL: https://apnews.com/hub/nhl and https://twitter.com/AP-Sports
Copyright 2022 STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.