Gabapentin is a prescription medication that belongs to a class of drugs known as anticonvulsants. It was originally developed to treat epilepsy, but over time its medical use has expanded to include several neurological and pain-related conditions. Gabapentin works by affecting how nerves send signals in the brain and nervous system, which can help reduce abnormal electrical activity or calm overactive nerve signals.