Dressage has always been a Cinderella sport in the UK, which is appropriate because the horses look like they should be pulling a gilded carriage. But on Tuesday at Greenwich the British team put in a princely performance to secure Team GB's record-breaking 20th gold of the Games.

The dressage powerhouses of Germany, winners of the team gold at the past seven Olympics, and the Netherlands had to be satisfied with silver and bronze as the British trio – Carl Hester, Laura Bechtolsheimer and Charlotte Dujardin – won at the most elegant of canters.

In the UK dressage has always been less popular than it is in other parts of Europe – the British prefer the rough and tumble of cross-country to the precision of the ring – but it seems that finally the sport, a profound test of the relationship between horse and rider, can come to the ball.

Britain had never won an Olympic dressage medal of any hue in a century of trying, but there was enormous confidence behind this team, which had won last year's European championships, tempered only by the fear that with all three scores counting a single disaster could ruin everything. In a gusty wind and in front of a capacity crowd of 23,000 which repeatedly had to be quietened as the British riders entered the arena, that was always a possibility.

Hester, a 45-year-old from the tiny island of Sark competing in his fourth Olympics, was first rider out for Britain and performed superbly on Uthopia, posting an Olympic record score of 80.57% – seven judges mark the riders out of 100 on a series of prescribed movements. A score over 75% is excellent; more than 80% is prodigious.

Bechtolsheimer rode second for Britain. This was potentially the make-or-break leg, as her performances haven't quite matched those of her colleagues, but the 27-year-old, whose partnership with Mistral Hojris (she calls him Alf) has been crucial to the rise of British dressage in the past few years, put in a measured performance, despite the accompaniment of a passing helicopter. Asked afterwards whether it had bothered her, she said she hadn't even noticed it, so great was her concentration.

Her score of 77.79% was enough to keep Britain's nose in front, and with the German and Dutch riders failing to break into the 80s, the stage was set for the 27-year-old Dujardin on the brilliant Valegro. Dujardin has been riding grand prix dressage for only two years, but Hester – who trains her and part-owns her wonderhorse – had complete faith in her. She repaid it handsomely, recording a score of 83.28%, an Olympic record, to snuff out any remaining German hopes. Hester's record had stood for just 90 minutes, and Britain had the gold.

"I was so nervous going in," said Dujardin. "I wanted that gold medal so badly, and I didn't want to let anybody down." Nor did she. It was a remarkably cool performance from the youngest rider on the team. During the past 19 months, she has set a grand prix special world record, grand prix and grand prix special Olympic records, a British freestyle record, and won Olympic and European gold.

"It's surreal," said Dujardin, who linked up with Hester six years ago after her mother asked him to give her daughter a dressage lesson. "I only started at grand prix level in January last year, then I got a gold medal at the Europeans, and it was the ultimate dream to come to London and ride here. Valegro is a once-in-a-lifetime horse."

Will Connell, the British Equestrian Federation's performance director, paid tribute to the role of Hester, both as rider and as coach of Dujardin. "For Carl, wow!" he said. "He must be the only athlete in these Games who is both a gold medallist and has coached another gold medallist."

"The three of us come from totally different backgrounds," said Hester. "It is amazing that I learnt to balance and ride on a bareback donkey [on Sark], Charlotte came through the showing world, and Laura did everything across all the equestrian disciplines before she took up dressage.

"You don't know when the dream is going to come true, but we've got our dream now. It is the best thing that could happen to our sport."

He said the victory would give dressage a huge boost in the UK. "It's shot our sport into a different league. We've had so many years of dreaming about it. This is my fourth Olympics, and it's weird because I've gone to three with no expectations and it's easy to ride like that.

"To come to an Olympics where we were expected to get gold gave me a frightening feeling, but this is a truly special moment for everyone involved in British dressage."

The publicity surrounding Ann Romney's horse, Rafalca, has also raised the profile of dressage in the United States, though the jury is out on whether it has been good or bad for the sport. Her husband Mitt, the Republican presidential hopeful, has been embarrassed by the association with a pursuit seen by some as a bastion of privilege, and he may not be too disappointed that Rafalca put in a sub-70% test and failed to qualify for Thursday's individual competition, for which Dujardin is now the favourite.

If the legacy that Hester envisages is to be secured in the UK, the sport will need to cast off its elitist, moneyed, top-hatted image, though Claire Shand of the British Equestrian Federation insists that reputation is undeserved.

Top hats, she said, are only worn at the highest level; the love of bling – Dujardin wears Swarovski crystals in her spurs and hair-net – is part aspirational fantasy, part self-parody; and you don't need a multimillion-pound horse to compete in lower-level competitions.

"Dressage is accessible," said Shand. "You don't have to throw yourself over massive fences, and you don't need a big, expensive horse to do it. "Winning here will be amazing for the sport. Suddenly there are role models for people to look up to." Cinderella has arrived – and is looking good with that gold medal round her neck and Swarovski crystals in her hair.