Phillips' heroics mean New Zealand must chase 369 runs for an unlikely victory at the Basin Reserve in Wellington.
It would be the Black Caps' best-ever fourth innings chase, but the Kiwis can at least claim the momentum as they attempt to scale the mountain.
Phillips (5-45) tore through the Australian middle order, removing Travis Head (29) and Mitch Marsh (golden duck) in consecutive balls to set up an unlikely hat-trick attempt.
Alex Carey survived that delivery but Phillips claimed the wicketkeeper soon after, caught well by Tim Southee for three.
Phillips dismissed Usman Khawaja (28) earlier in the day - stumped by impressive wicketkeeper Tom Blundell - and removed dangerman Cam Green for his fifth wicket.
Maiden five-for feels!— cricket.com.au (@cricketcomau) An outstanding spell by Glenn Phillips � #NZvAUS pic.twitter.com/2m2fK2GSH6March 2, 2024
Green, who made an unbeaten first innings 174, departed for 34 after an inside edge ricocheted off his pads, allowing Will Young to dive from short leg and take the catch.
It would have been an even better day for New Zealand if they had stuck their catches.
Poor fielding blighted the Black Caps, with Scott Kuggeleijn, Southee twice, and Henry Nicholls all dropping regulation chances.
Another negative for the hosts came as Will O'Rourke, their tidiest pace bowler with 0-11 including four maidens, hobbled off the field with a tight hamstring in his eighth over.
New Zealand would have surely taken an Australian second innings under 200 if offered it at the start of play.
On a blustery and overcast day in Wellington, Australia resumed with Khawaja and nightwatchman Nathan Lyon at the crease.
Flipping the script, Lyon dominated the partnership with his second-best Test score, tallying 41 off 46 deliveries in a spirited knock.
The 36-year-old struck six boundaries in a fine cameo, including three fours in a row off Southee, as he ticked towards his first half-century in 168 Test innings.
Lyon fell agonisingly short of that milestone, clipping Matt Henry's fuller delivery off his pads to Young, lurking square of the wicket.
Usman Khawaja is out stumped by Tom Blundell for 28 in Australia's second innings. (AP PHOTO)
Australia posted 383 in their first innings when Green improved his day-one ton to an unbeaten 174 and shared in a monster 10th-wicket partnership with Josh Hazlewood.
The tourists then stifled the Black Caps, leaving them 3-12 and 5-29 before they rallied to 179.
Phillips was the best of the Kiwi bats with 71 and said at the close of play on day two that New Zealand would be in the contest with a chase under 400.
"Test cricket ebbs and flows quite a lot," he said.
"If (the pitch) flattens out, it becomes nice to bat on and there's plenty of time left in the game.
"We'd still have a good go at chasing 350, 400 - especially if it flattens out."
New Zealand came into the Test after five straight wins at Wellington's Basin Reserve, and hopeful of a first home success over Australia in 31 years.