I'm not a vet but this is what I understand:
There is no definitive diagnosis for epilepsy. Seizures can result from several things ... low blood sugar, toxin of some kind, trauma. Blood work soon after the seizure can rule out the first two. Then, if there has been no trauma, the default diagnosis is probably epilepsy.
Treatment with meds can manage epilepsy effectively and the dog can usually live a long normal life. Without treatment, it will NOT go away, and seizures will probably become more frequent.
5 months is pretty young ... I believe they usually begin to appear in an epileptic dog around 3 or 4 years of age.
Again ... I am not a vet. Good luck.