Shemyakina prevailed after an even match, winning in overtime after her German opponent came back from behind in the third period to level the score.
Sun Yujie took the bronze medal for China in the women's individual epee Monday after her South Korean opponent A Lam Shin had delayed proceedings by an hour with a prolonged protest.
Sun prevailed 15-11 in the rescheduled bout, which followed a disputed semifinal defeat to Heidemann after which Lam Shin sat weeping on the piste as her coaches launched an appeal over timekeeping, arguing that the clock had been wrongly reset at the end of the fight, giving the German extra time for a comeback.
Officials upheld the original ruling and Lam Shin was escorted from the arena by officials to a standing ovation from spectators.
After winning gold, Shemyakina said she was "very sorry for the Korean", calling the decision a "once in a lifetime" occurrence.
Fencers are required to remain on the piste for the duration of an appeal.