Yi finished with a winning total of 502.9 points after 40 shots in the qualifying round and 10 in the eight-woman final at the Royal Artillery Barracks.
Poland's Sylwia Bogacka, who led for most of the final, claimed silver with a total of 502.2 after a costly 9.7 shot in the eighth round. Yu Dan of China won bronze with a total of 501.5.
Yi, the world number one, smiled in delight as she scooped what is sure to be the first of many golds for China at the London Games.
"I feel very happy," Yi said through an interpreter in between posing with her medal for photographers.
"For the first round and the last round I was very nervous and didn't know what I was doing.
"I think this is going to bring some changes to my life as well."
Among the 2,000 spectators in attendance for the final was International Olympic Committee President Rogge, who clapped from his seat when Yi was confirmed the winner as Chinese dignitaries around him leapt to their feet in delight.
"Yes I did (enjoy the shooting). It was very well presented there is a lot of suspense, it is a matter of tenths of points," Rogge told reporters.
"The crowd was very knowledgeable and very supportive."
Rogge said he would be attending all 26 sports in London and will present one more medal, at the men's marathon, the last he will do in his role which he steps down from next year.
Enjoying an unusually high level of interest as the opening medal event, both Yi and Bogacka showed their prowess in the 56-woman qualifying round where they eased through with a near perfect 399 points out of a maximum 400 from 40 shots.
They were neck and neck after scoring 10.8 in the first round of the final, where shooters fired at a target with a maximum achievable score of 10.9.
Bogacka nudged ahead with a 10.3 in the second round after Yi could only manage a 10 and the Pole maintained her lead through five rounds with another 10.8.
Victory looked assured as Yi fell 0.7 points behind after Bogacka fired a 10.5 in the seventh round with the duo way ahead of the other six competitors, but nerves inevitably played a part.
A poor 9.7 in the eighth round was capitalised on by the 23-year-old Chinese, who fired a scintillating 10.7 to turn a 0.3- point deficit into a 0.7 lead.
Yi then kept her composure to close out with 10.3 and 10.5 efforts to seal her first Olympic gold.
"I don't feel like a loser because I'm second," Bogacka told reporters with a rueful smile.
"It happens sometimes," she said of the crucial eighth-round shot. "I didn't prepare everything for this shot and that is the reason why I shot nine."
Yi said she had been lucky to gain victory but her greater consistency in the final, where her lowest score was 10, proved the difference with Bogacka twice hitting nines.
For Yi it brought an end to a long wait for her moment to shine after she became the first woman to qualify for the Games in 2010 following her victory at the world championships.
Nine months in a training camp followed in preparation for her first Olympics.
"I feel there has been a lot of pressure these last two years," Yi said, after security had to step in to remove the hoards of Chinese media who thronged her as she made her way to the news conference.
"Now I got the gold medal for the Olympic Games I feel very happy and very excited and... I feel the pressure has been released."