Dujardin, riding her gelding Valegro to music that included the theme from "The Great Escape," went last in the grand prix freestyle finale and garnered a score of 90.089 from the seven-member ground jury.
She was the first person to win the event in front of a home crowd since 1972.
Adelinde Cornelissen of the Netherlands scored an 88.196 for the silver and Great Britain's Laura Bechtolsheimer earned bronze. Bechtolsheimer's score of 84.339 was just .036 ahead of Germany's Helen Langehanenberg.
Dujardin and Bechtolsheimer's medals were the first ever for Britain in the event. They were already a part of Great Britain's team dressage gold medal win. The host nation finished with five medals in the sport -- one more than Germany and the Netherlands.
Meanwhile, the United States went without a medal in equestrian for the first time since 1956. Steffen Peters placed 17th out of the 18 riders who made the grand prix freestyle finale.
The Ann Romney-owned horse Rafalca, ridden by Jan Ebeling, had previously been eliminated.