The 21-year-old defeated her fellow Chinese competitor by two games to one on Saturday afternoon.
Li won the first game against Wang 21-15 but lost the second by a narrow margin of 23-21.
However, Li found her rhythm back in the third and decisive game, winning it 21-17.
Wang Xin won the first game 21-18 but strained her knee before claiming the final point. She received medical attention before claiming the game, but limped off the court with the score 1-0 in her favour in the second game.
Nehwal's medal was India's third at the London 2012 Games.