In reply to WA's 8/492 declared, the West End Redbacks were in trouble at 7/154 early on day three.
But a fighting personal best score of 143 off 200 balls from first-time skipper Carey helped lift the SA to 353 - just 10 runs past what they needed to avoid the follow-on.
WA ended day three at 4/70 in their second innings - an overall lead of 209 - with Shaun Marsh (32no) and Cameron Green (7no) at the crease.
Carey's classy knock and a clutter of late WA wickets have given the Redbacks a sniff.
Carey feels his team can chase down a target of around 300.
"We didn't have the first two days go to plan and we put a big focus on today to show some fight and some spirit," he said.
"I'm really proud of the boys for how we stood up with the bat and then how we finished the day with the ball."
Warriors opener Cameron Bancroft fell for 23 when he feathered a leg-side delivery through to the keeper for debutant Liam Scott's maiden first-class wicket, while Marcus Stoinis and Jake Carder fell for ducks.
Stand-in skipper Ashton Turner was dismissed for six, capping off a disastrous period in which WA lost 3/12.
He was brought undone shortly before tea when he edged a rising Marcus Stoinis delivery through to the keeper.