Ogogo, whose hopes of making it to his first Olympics were nearly ruined by a serious shoulder injury last year, became the first Briton to reach the quarter-finals after he beat the Ukrainian world amateur champion by the tightest of margins.
World number one Khytrov came back from two points down in the first round to level at 18-18 at the end of the bout and after the pair could still not be separated when the judges' individual scores were totted up to show 52-52, they were each asked to call a winner.
After an anxious three minute wait, the longest for a decision at the Games so far, the 23-year-old Briton was deemed the winner and fell to his knees before leaping around the ring and beating his chest to the delight of a packed house.
The Ukrainian team, shocked at losing the top seed, lodged an appeal which the International Boxing Association said did not mention any specific motivation and was rejected.
To add to the confusion, the official draw sheet showed the scores of three judges which when added up, scored the fight 53-52 in Khytrov's favour.
"Nobody thought I was going to win that fight apart from me, my team and my family. I don't think even the rest of my team-mates thought I was going to win it," Ogogo, who landed some big early right hand shots before surviving two standing counts, said.
"I just believed in myself and that's all you have to do. I want to inspire people, that's what the Olympics is all about for me."
The Ukrainian Olympic Committee told Reuters they were considering taking their case to the Court of Arbitration for Sport, pointing to the fact that the scorecard was carrying a score in favour of their fighter.
However a spokesman for AIBA said there was no mistake in the final score and that the system only showed selected scores and that when a bout is tied, the calculations are made based on the complete individual scores.
AIBA later released all the judges scores for each round and the countback to explain how they reached the tie, the first time, it said, that individual judges' scores have been published in full.
Remarkably a flyweight bout between Han Soon-chul of South Korea and Hungary's Vazgen Safaryants also finished level after all three rounds and a subsequent countback. A cornerman for Safaryants said they would complain after the Korean was awarded the win.
Only six weeks ago, Ogogo had to put his preparations for the Olympics to one side when his mother Teresa suffered a brain haemorrhage. She was still too ill in hospital to watch her son's first fight on Saturday.
Ogogo, who is now just one fight away from a guaranteed medal, said he deserved the victory after everything he has been through.
"It's so much sweeter but that's what got me over the finish line," he said.
The British fighter next faces Stefan Hartel of Germany on Monday.
Earlier the crowd were treated to a boxing masterclass by Khytrov's team-mate Vasyl Lomachenko, who won featherweight gold at the Beijing Games.
The Ukrainian showed exactly why he is overwhelming favourite for men's lightweight gold, barely moving out of first gear in an effortless yet brilliantly impressive 15-3 victory over Wellington Arias Romero of the Dominican Republic.
Josh Taylor became the first Briton to bow out of the London Games, the lightweight fighter losing 15-10 to vastly experienced former Italian world champion Domenico Valentino.
The Scotsman, who lost the final round 7-3 after two tight rounds, was left disappointed but is now targeting gold in Glasgow in two years’ time.
“I am going to go to Glasgow in 2014 and go one better than I did in Delhi,” said the 2010 Commonwealth silver medallist.
“I'm obviously incredibly disappointed after all the hard work, and support I've received, that I couldn't deliver a win today.
"I wanted to build on the silver I got in Delhi. Valentino deserved his win – I've got to re-assess and reflect on what's happened tonight.”
Taylor’s coach Lee Pullen felt his charge failed to follow the game plan, but accepted that the Italian was a challenge too far.
He said: “Obviously Josh is very disappointed because his Olympic dream is over. He wavered away a little bit from the tactics. Fair play to Valentino, he got it right on the money.
"Valentino is a bit of a spoiler. They know each other as they've boxed before and I think the result was similar to last time.
“There was a three or five point deficit then. He's a tricky customer and he knows his way around the ring. Valentino wins and goes on but we have no complaints."