Gabapentin is used to treat and prevent seizures. It is also used to treat nerve pain in individuals who have had shingles, a painful rash brought on by a herpes zoster virus. Another name for gabapentin is an anticonvulsant or antiepileptic medication.