"I tried to squeeze it," Elliott said. "It's a goal you definitely want back."
Fowler then tallied on the power play with a shot from the top of the circle to push the lead to 3-0 midway through the second period.
Schwartz got the Blues to within 3-2 with a power-play goal at 14:31 of the third.
Andersen took over from there with a key stop of a shot by T.J. Oshie with 2.6 seconds left. The Blues pulled their goalie with 1:08 remaining, but Andersen held onto the lead.
"He was fabulous, good since Day One when he got here," Boudreau said of Anderson. "He was calm. I thought he did a real good job near the end, especially for a first-year guy."
Anderson made 15 saves on 17 shots over the final 20 minutes.
"We showed a lot of character and kept working for each other," Andersen said. "This shows what kind of team effort we can have."
St. Louis is 1-7 against California teams this season. The Blues lost 4-1 to the Los Angeles Kings on Thursday.
"A three-goal deficit in this league against any team is tough," St. Louis captain David Backes said. "Hopefully, we can get something out of that third period."
NOTES: St. Louis LW Alexander Steen returned to the lineup after missing 11 games because of a concussion. He had four shots in 20:56 of ice time. ... The Blues have an NHL-best, plus-57 goal differential. ... Anaheim RW Teemu Selanne didn't play in the second of back-to-back games, as usual. ... RW Chris Stewart played in his 200th game with the Blues. ... The Ducks are 22-3-4 in games in which they score first. ... Anaheim is 19-1-5 in one-goal games.