Berglund tied it with a slap shot and then put a backhander past Smith 2:02 later to give the Blues the lead for good.
Scott Nichol added a second-period goal for St. Louis, after which Vladimir Sobotka and Alex Pietrangelo scored in the third.
St. Louis halted a two-game skid with rookie Jake Allen making 23 saves in the victory. Allen was recalled from the American Hockey League earlier this week.
Smith gave up all six goals on 29 shots.
Megyn Kelly: Santa Claus and Jesus are both white men
Costly malfunction causes beer flood at Boston-area brewery