Haydn Fleury and Max Jones scored in regulation for the Ducks. Anthony Stolarz made 25 saves and stopped all three attempts in the shootout.
Terry beat Jordan Binnington with a forehand-backhand combination in the second round of the shootout. Stolarz stopped Ryan O'Reilly in the next round to secure the win.
''Our guys came to play,'' Anaheim coach Dallas Eakins said. ''We were able to skate and compete against the very good, very structured team. The guys were real upbeat on the bench, really supporting each other, and we obviously got the outcome that we want.''
Eakins was impressed by Stolarz's demeanor in the overtime and shootout.
''He's such a calm kid anyway, but he just looked so calm and collected in there and made some excellent saves,'' Eakins said.
Mike Hoffman and Kyle Clifford scored for the Blues. Jordan Binnington made 33 saves.
''I think it was kind of a sloppy game all around,'' Hoffman said. ''Neither team was very clean. It was a lot of back-and-forth hockey.''
The Blues entered the game with a chance to clinch the fourth playoff spot in the West Division with a win and a Los Angeles loss.
Hoffman scored his team-high seventh power play to give the Blues a 1-0 lead with 6:27 left in the first period. St. Louis has scored a power play goal in 11 of its last 12 games.
Jones tied it for the Ducks, tipping in Sam Carrick's shot with 7:03 left in the second period. It was the second goal in the last three games for Jones.
Fleury's third goal of the season broke a 1-1 tie for the Ducks at the 2:15 mark of the third period. Terry started the play by winning the puck from Jordan Kyrou in the corner and feeding Fleury in the left circle for a one-timer.
Clifford tied it back up for the Blues three minutes later, deflecting an Ivan Barbashev feed into the net for his fourth goal of the season.
Ducks F David Backes played in perhaps his final game in front of his parents where his NHL career began. Backes has not made an official announcement, but he has made strong indications that he will retire after a 16-year career.
The Blues drafted Backes 62nd overall in the 2003 draft. He played his first 10 seasons in St. Louis, including five as captain. The team honored him with a video tribute midway through the first period which drew a standing ovation from the crowd.
He was named the game's No. 1 star.
Ducks captain Ryan Getzlaf played in his 1,100th regular-season game.
St. Louis forwards Vladimir Tarasenko (lower body) and Sammy Blais (upper body) were scratched. They are considered day-to-day.
Ducks: At Minnesota on Friday night.
Blues: At Vegas on Friday night.
More AP NHL coverage: https://apnews.com/hub/NHL
Copyright 2021 STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.