Hannah, 28, and partner Saskia Clark, won the women's 470 sailing – a result which was virtually guaranteed after they entered the final race with a 20-point lead.
The pair dominated throughout the event, winning three races and finishing in the top eight in all 10. The medal race had been scheduled to take place on Wednesday, but had been postponed until Thursday because of a lack of wind.
Only a disqualification or technical problem could have denied Mills and Clark, fourth in the world rankings, and they stayed out of trouble as they finished eighth out of 10.
They missed out on gold at London 2012, taking silver as New Zealand edged them out in the medal race.
Hannah, who completed a diploma in Mechanical Engineering, said: "I can't believe it. It has actually been the best feeling ever. We have forgotten all about [the silver medal in] London. We are so proud to come back after it and we've worked so hard to get the upgrade to gold.
"Thank you to everyone back home for the support. It is all we have ever dreamed of and we are so happy."
Her medal adds to the silver won by fellow University of Bristol alumnus Tom Mitchell, who captained the men’s Rugby 7s team to the final in Rio where they lost to Fiji.
Law graduate Georgie Twigg will compete for Team GB in the final of the women's hockey final tonight, which gets underway at 9pm (BST). The British team, who are unbeaten in the tournament, face the Netherlands. Whatever happens, Britain’s women have already confirmed their best performance in Olympic hockey history.
Fellow Law graduate Jazmin Sawyers came 8th in the long jump final, with a jump of 6.69m.