Steve Smith and Adam Voges scored the fifth and sixth centuries of the Second Test to give Australia a lead of 193 after Ross Taylor's epic 290 brought New Zealand back into the contest on day four.
Smith hit his eighth century in 13 Tests over the past 12 months, and his fourth in five Tests as captain, while Western Australian Voges delighted the WACA crowd with his first on home soil to take the hosts to 254 for two.
The skipper will resume on 127 not out and Voges unbeaten on 101 in a partnership of 208 that steadied the innings after New Zealand had removed openers Joe Burns (0) and David Warner (24) cheaply.
That drove home the tourists' advantage after Taylor's mighty 374-ball knock, which featured 43 fours, had dragged his side back into the match with a first-innings lead of 65.
The 31-year-old's innings was the highest score by any visiting batsman in Australia, bettering the previous record of 287 set by England's Tip Foster in Sydney in 1903.
It was also the third highest innings by any New Zealand batsman in a Test and eclipsed the 253 contributed by Warner to Australia's first innings tally of 559-9 declared, which had looked almost unassailable on day two.