Wainui gave his side the lead for good after a topsy-turvy encounter on the scoreboard even though the home side had dominated much of the possession and territory.
Fullback Solomon Alaimalo and hooker Nathan Harris had scored either side of half time to give the home side a 20-7 lead only for the visitors to come storming back with tries to Tevita Li and Sio Tomkinson and take a two-point lead with about 20 minutes remaining.
The Highlanders, who lost first five-eighth Lima Sopoaga early in the match with what appeared to be a serious Achilles injury, had scored the match's first try through All Blacks winger Waisake Naholo.
The Highlanders had held a 7-6 lead after a scrappy first half before fullback Alaimalo crossed after a sustained build-up and brilliant leap, catch and pass in one movement by winger Toni Pulu following a cross kick.
The Chiefs extended their 13-7 halftime advantage just four minutes into the second spell when hooker Harris was driven over to give the home side a 20-7 lead and looking like they could run away with the game.
The visitors, however, managed to fight their way back into the game with winger Li put over by a brilliant wide pass from half-back Aaron Smith.
While replacement first five-eighth Fletcher Smith missed the conversion he added his first penalty to get his side to 20-15 with a little over 20 minutes remaining.
The visitors then surprisingly grabbed the lead when a Damian McKenzie clearing kick was charged down, brilliantly scooped up by hooker Ash Dixon and swung wide by Aaron Smith to Luke Whitelock who put replacement outside back Tomkinson over.
The Chiefs, however, struck back with Wainui's try in the left corner and the home side then stole two crucial lineout throws from the Highlanders in the final minutes to ensure they did not sneak a late win.