Great Britain's eventing team won gold and there was an individual silver for Tom McEwen after a dominant and memorable display at Tokyo Equestrian Park.
It was Great Britain's first Olympic team gold in eventing since Munich 1972, when they were inspired by Richard Meade, who also won the individual title that year.
Gloucestershire-based Collett's gold comes just eight years after she was left in a coma for a week after falling on cross-country during an event in Hampshire.
She suffered a punctured lung, lacerated liver, a fractured shoulder and two broken ribs, while she also lost the sight in one eye.
Together with world number one Townend, she also had a chance of an individual medal, but they both had eight faults and dropped to ninth and fifth respectively.
McEwen, whose yard is based on the Princess Royal's Gatcombe estate, piloted Toledo De Kerser to second place.
In doing so, the 30-year-old secured Britain's highest individual eventing finish since Leslie Law won gold in Athens 17 years ago.
The individual title went to Germany's Julia Krajewski, who became the first woman in Olympic history to be crowned eventing champion, while 62-year-old Australian Andrew Hoy took bronze.
Collett said: "I could only have dreamt of being here, let alone stand here with a gold medal around my neck.
"Standing on the podium, it makes every bad day worth it. It was an incredible experience.
"At the moment, I feel like it is all one big dream. I have been dreaming of this moment, just to be at an Olympics. There have been some tough days along the way.
"I was lucky to survive, and now I am lucky to win a gold medal. Roll on the next rollercoaster in my life!"
McEwen added: "It is not really hitting me at the moment. It has all been so special.
"I have loved the pressure this week. It's why I get up every morning, and I have loved it that there has been pressure on us."
For 38-year-old Yorkshireman Townend, he now adds an Olympic title to three European team golds and a handful of elite five-star victories at blue riband competitions like Badminton and Burghley.
"It is only three years until the Paris Olympics," Townend said.
"Our two horses will be old enough, they are both very sound, and Laura's is younger, so it is more than possible they could get to Paris.
"I have never been as happy or comfortable on a team. We have definitely got a rapport, and we have tried to help each other when necessary.
"We will find a way to celebrate – and it definitely won't be with a cup of tea and a biscuit!"
Final British rider Townend had the luxury of knowing he could knock four fences down and still win gold, such was the team's dominance.
Britain finished on a score of 86.30, and it was a third equestrian medal in Tokyo for Team GB – before McEwen made it four – following Charlotte Dujardin, Carl Hester and Charlotte Fry winning dressage team bronze, and Dujardin also collecting an individual bronze.
It was Britain's fourth Olympic team crown in eventing after Stockholm in 1956, Mexico in 1968 and Munich four years later.
Britain's vintage collection of cross-country performances on Sunday effectively turned the gold medal race into a procession.