Dylan Gambrell and Tomas Hertl scored, and Devan Dubnyk made 16 saves for San Jose (11-14-4), which has lost four straight.
"It's frustrating," Dubnyk said. "Sometimes, it just feels like it's something each night. We're playing well and we just can't quite stay with it for whatever reason. We just need to figure out what that is because we've been playing good hockey. We're just not getting the results."
O'Reilly scored a power-play goal from the right face-off circle at 4:22 of the third period to give the Blues a 3-2 lead. It came after the Sharks were called for a face-off violation at 4:10.
"We had to (take advantage of it)," St. Louis coach Craig Berube said. "We didn't do it on the first two power plays, so we needed to take advantage of that one, and we did."
The Sharks were upset that Patrick Marleau, who was the second player in the face-off circle after Logan Couture got kicked out, was called for the infraction.
"It turned the whole game around," San Jose coach Bob Boughner said. "It took the game out of our hands a little bit there, and now we're playing catch-up. … I haven't seen that call in I don't know how long. This year, I haven't seen that call. That one hurts."
Kyrou scored his second of the game at 15:51 to make it 4-2, and Perron scored into an empty net at 18:01 to make it 5-2.
Hertl tied the game 2-2 at 8:10 of the second period when he got in alone against Husso off a pass from the right half-wall by Timo Meier.
Gambrell gave the Sharks a 1-0 lead at 2:23 of the first period, but Dunn tied it 1-1 at 3:32 when a shot that was going wide went in off the left leg of defenseman Erik Karlsson.