Trott started the day in sixth but a second-place finish in the individual pursuit followed by a fine victory in the scratch race meant she was in pole position going into the final stage.
She managed to gain an early lap in the scratch that gave her the momentum for victory – something she has never managed before.
"I've taken a lap in the points but never in the scratch," said Trott. "When you're a kid and you race nationals you race like that you just think sod it and just go sort of thing.
"Normally in the omnium you're just sitting back racing the people who are in the top six but I was never going to win the omnium by doing that so my coach was just like 'go for it, floor it'."
Trott was pushed close by Canadian Gillian Carleton but managed to seal victory against her opponent in the 500m time trial.
However, it was the scratch that gave Trott the momentum to pull through.
"I'm normally terrible at the scratch aren't I? But I didn't really have a choice to be honest," she added.
"I went into the race six points down and I was really on the back foot; my coach said to me I've got to at least try and win."
"I just thought this is my chance I'm not going to get another chance like that so I just thought I'd take it and if I didn't get the lap I didn't get it, at least I tried but I mean I did get it and it paid off."
Meanwhile Elinor Barker was unable to follow up her world record-breaking stint in the women's team pursuit on Friday evening as she finished well down the field in the 20km points race.
Laura Brown of Canada came home first ahead of American Elizabeth Newell while Hong Kong’s Wan Yiu Wong completed the podium.