Seven-year-old Emma Bookless, from Bishopbriggs in East Dunbartonshire, suffered daily seizures, loss of appetite, frustration and her school work was suffering because of a severe form of the condition.
But specialist doctors at Great Ormond Street Hospital, London, carried out a life-changing operation on her brain - only about 20 of which take place every year.
Her mother Rebecca said the surgery had marked a dramatic turnaround in Emma's life. She said: "I have my little girl back.
"Emma is so much calmer and content - everyone has commented on the massive change. She is incredible."
Emma, who is a pupil at Balmuildy Primary, was diagnosed with epilepsy when she was three-and-a-half years old.
Rebecca, a central support manager with Optical Express in Glasgow, said: "We were having breakfast one morning and she starting having a seizure.
"I called an ambulance, which took us to Yorkhill Hospital.
"While she was there she had another seizure, so they were able to diagnose her."
Emma had never previously displayed any symptoms of epilepsy so this came as a huge shock to Rebecca and her family.
"But the doctors at Yorkhill were very positive and said they would give us medication to control the seizures and that Emma could grow out of it," Rebecca said. "Sadly, that didn't happen."
Emma continued to have seizures, most of which happened during the night, leaving her exhausted and aggressive during the day. She also lost her appetite, which meant she lost weight.
Rebecca was given some hope when Emma was referred to Great Ormond Street Hospital.
Just days after the second operation, the week before Christmas, Emma was alert and trying to run and play.
Rebecca added: "I knew instantly it had been a success."