The Warriors were bowled out for 258 in the final act of day two, giving them a lead of 78 after NSW were rolled for 180 on day one.
Wyllie was the hero of the day, cracking 15 boundaries on the way to posting 104 off 204 balls.
The 18-year-old was playing just his third first-class match and showed maturity beyond his years to guide WA out of early trouble.
And it appears WA have found another diamond in the rough in the form of debutant Sam Fanning.
The 21-year-old scored 32 runs off 161 balls at a pain-staking strike rate of 19.88 to help quell the NSW attack on a bowler-friendly wicket.
Tail-ender Matt Kelly then posted an unbeaten 47 off 86 balls to ram home WA's advantage.
NSW debutant Ben Dwarshuis (4-48 off 20 overs) was the pick of the bowlers, with his early onslaught leaving WA in trouble at 3-39.
WA were still in strife at 6-100 before Wyllie, Joel Paris (25) and Kelly buckled down.
The Warriors started the day at 2-18 and Hilton Cartwright (16 off 56 balls) was the first to fall on Tuesday after being given out LBW to Jack Edwards (2-44).
Although the ball struck Cartwright on the back leg it looked as though it was going to sail over the stumps.
But WA received a couple of lucky breaks just before lunch.
Wyllie survived a confident LBW shout from paceman Liam Hatcher.
And next over Fanning was lucky to be given not out after being struck on the pads by spinner Nathan Lyon (1-42 off 17 overs).
Fanning's strike rate of 19.55 at the lunch break didn't make for pretty reading.
But his grit on a tricky wicket proved crucial in steadying the ship.
Wyllie's determination also proved vital, especially once Fanning departed.
Dwarshuis left WA reeling with two quick wickets late on Monday, and he returned to take the key scalps of Josh Philippe and Aaron Hardie shortly before tea on Tuesday.
But Wyllie refused to give in and he gained in confidence the longer his innings went.
The right-hander departed late in the day when he edged Chris Tremain (2-25) to slip.
By then, WA already had a handy first-innings lead that could prove crucial in the final result.
NSW's meagre first innings score of 180 would have been far less had it not been for captain Kurtis Patterson, who defied a five-wicket haul from speedster Lance Morris to finish unbeaten on 72.