Havlat fired in a rebound 41 seconds into the first to open the scoring. Stempniak tied it 46 seconds later, connecting from the edge of the crease.
Brewer gave the Blues a 2-1 lead at 3:43 of the second when his shot deflected off Chicago's James Wisniewski and between Khabibulin's legs.
William's first goal, at 6:11 of the second, tied it 2-2. He swept in a shot from the right side of the net after the puck deflected off St. Louis' Alex Brooks.
Williams gave Chicago a 3-2 lead during a power play with 4:50 left in the second on a high shot from the left circle.
Bourque made it 4-2 with 2:11 remaining in the period when his shot ticked in off Legace's left skate.
Woywitka cut it to 4-3 on a screened shot with 7:35 left.