After allowing nine home runs in losing the first two games of the series by a collective 22-5 score, the Cardinals amassed a season-high 17 hits — 14 of them singles.
Bourjos capped the barrage with a three-run drive in the ninth off Zach Britton, ending the left-hander's run of 27 straight scoreless appearances at home.
Wong's four hits, all of them singles, matched a career high and lifted his batting average 11 points to .253.
St. Louis right-hander Lance Lynn (12-8) gave up three runs and nine hits over 5 2-3 innings, only the second time in his last 12 starts that he allowed more than two runs.
Nick Markakis had four hits for the Orioles, who went 2 for 13 with runners in scoring position. Caleb Joseph's streak of consecutive games with a home run ended at five, one short of the club record.
Orioles manager Buck Showalter was ejected after a replay overturned an out call on a force play in the top of the seventh. It was his first ejection of the season.
Baltimore starter Kevin Gausman (6-4) allowed three runs and eight hits in five innings.
The AL East-leading Orioles next host the New York Yankees for a three-game series that begins Monday night. New York trails by six games.
St. Louis went up 4-2 in the sixth on an RBI single by Daniel Descalso, but Markakis matched that in the bottom half with a run-scoring single.
Successive doubles by Descalso and Matt Carpenter, off Andrew Miller in the eighth, made it 5-3.
Baltimore answered in the bottom half on an RBI double by Nelson Cruz.
After Jon Jay singled in a run in the St. Louis third for a 3-1 lead, two singles and a wild pitch by Lynn cut the deficit to a run in the fifth.
Orioles: Shortstop J.J. Hardy was a late scratch from the starting lineup with a sprained left thumb.
Cardinals: Right-hander Shelby Miller (8-8) seeks his 25th career victory Monday night in the opener of a three-game series in Miami.
Link to box score: St. Louis (62-53) 8 at Baltimore (67-50) 3
Join the pre-game, in-game and post-game discussion about each contest at The Cardinal Nation message board.