Question: how did elena get her memories back?
Answer: After some setbacks, in The Vampire Diaries season 6, episode 20, "I'd Leave My Happy Home For You", Elena was finally able to consume it. With Damon by her side, Elena got everything she had wished for since becoming a vampire. ... She stated as such right before taking the cure, with Damon vowing to take it with her.