Bruins goalie Tim Thomas held the Blues scoreless for the first 56 minutes, but the Blues, who were shut out in their last game, scored twice in a 2:30 span late in the third period to tie it.
Stempniak snapped a scoreless drought of 143:02 for St. Louis when he converted a centring pass from Bill Guerin at 16:03 to cut Boston's lead to 2-1. Jamal Mayers tied it when he swatted home the rebound of a shot by Keith Tkachuk at 18:33.
Manny Legace stopped 16 shots during regulation and overtime, and three of four attempts in the shootout to record his first win as a member of the Blues.
Thomas was pulled after 48 minutes in the Bruins season opener in Florida when he allowed seven goals on 34 shots in an 8-3 loss. He made 33 saves Thursday but gave up shootout goals to Tkachuk and Stempniak, who beat him with a backhander on the Blues fourth chance.
Legace then stopped Marc Savard to clinch the Blues first victory.
Savard and Patrice Bergeron scored in regulation for the Bruins, who have dropped three of four on their season-opening, five-game road trip.
Thursdays game was the first at home under the team's new ownership, Sports Capital Partners, LLC, which purchased the Blues during the off-season. Chairman Dave Checketts, who guaranteed a victory in the home opener over the summer, addressed the crowd before the game.
Boston was the perfect opponent for such a guarantee, as the Blues have not lost to the Bruins at home since Oct. 17, 1995, a span of seven games.
Bergeron gave the Bruins the lead 5:55 into the game when Blues defenceman Jamie Rivers gave up the puck just inside the blue line, allowing Bergeron to walk in alone. He took his time, faked Legace out of position and slid it into the open side of the net.
Savard scored off a give-and-go with Brad Stuart at 3:09 of the third period to make it 2-0.
Notes: Legace played in his 200th NHL game. ... No. 1 draft choice Phil Kessel assisted on Bergeron's goal, giving him two points in four games. ... Thursday's game was one of only three the Bruins will play outside the Eastern time zone. ... The Bruins conclude their road trip at the New York Islanders on Saturday night.