He came from an estimated 28s back to regather the lead in an elbow-to-elbow passing manoeuvre, creating one of the Games' most thrilling moments.
"I had the motivation from four years ago where I felt a bit robbed," Gaze said. "Today I wasn't accepting anything other than a win.
"I've built the sort of perseverance to handle something like that [a flat tyre] over the past 12 months. If it had happened before then, my race would've been done.
"I had a small problem on the back wheel but I was able to get back into the race."
Cooper said he couldn't think of anything he would've done to change the result.
"I might look back later and think I could've done something. Even on the last lap I don't know what happened to Sam, I saw he stopped. When he came through the tyre looked fine and it's not my job to sit around and ask. I kept on riding.
"I thought at that point it was me and the South African heading up the hill, so I attacked, then saw Sam 15-20m behind.
"The sprint at the top was quite a drag before the last downhill. I knew that would be crucial, that was kind of the finish line and he managed to sneak around me there. I didn't close the door early enough. I couldn't have drifted any harder across because that wouldn't have been fair."
Earlier, the pair worked alongside Hatherly to build a lock on the podium.
Fellow Kiwi Ben Oliver was fourth.