In crosswinds, it was a stop-start opening quarter with scrums aplenty for handling errors, while City second-five Mitai Hemi looked dangerous on the charge and WHS prop Aporosa Bulivou rattled cages with his heavy tackles.
Dropped ball off the scrum in their own 22m proved costly for City as WHS midfielder Jaydn Rourangi toed through and won the race in-goal, with fullback Simione Tarogi converting.
City hit back when they got the latest in a series of penalties in WHS's half, and this time Hemi did not have as far to run as he smashed through to score.
WHS took their 7-5 lead into halftime but played on either side of the break with 14-men after lock Jarred Hawkes' yellow card.
City exploited their overlap to surge at the line, Hemi going close, with the ball recycled for hooker Narmie Marino to drive low and put his team ahead 10-7.
Returning to full complement, WHS responded with their best passage of play, scoring back-to-back tries.
After flanker Isaac Jordan was stopped right on the line, hooker Regan Tyson-Nepia forced it down off the ruck.
Only moments later, WHS had a tap penalty and spread wide to a motoring Tarogi, who outstripped the cover tacklers and then stepped back through defenders to go under the posts, handing the conversion in front to Rourangi.
WHS were clear at 19-10, but City hit back immediately, as flanker Jayden Lower snatched the try-line ruck ball up and managed to twist through tacklers to get it down, back-first.
No 8 Tatara Cook stepped up and nailed the difficult angle conversion for 19-17 with less than 15 minutes left.
WHS lost Rourangi to the sin bin for the rest of the game, but after pressuring the visitors inside the 22m, they managed to force a fumble.
From the scrum, first five-eighths Anthony Sellers probed, and then Jordan found a half-inch gap to drag his tacklers over the line, with Tarogi nailing another crucial conversion.
City did not lie down - securing a kickoff turnover and another tap penalty to put the ball through the hands for winger Sigv Kumeroa to step inside and score in the last act of the game.
Whanganui High School 26 (J Rourangi, R Tyson-Nepia, S Tarogi, I Jordan tries; Tarogi 2 con, Rourangi con) Whanganui City College 22 (M Hemi, N Marino, J Lower, S Kumeroa tries; T Cook con). HT: 7-5.