Encephalitis is inflammation of the active tissues of the brain caused by an infection or an autoimmune response. The inflammation causes the brain to swell, which can lead to headache, stiff neck, sensitivity to light, mental confusion and seizures.