Infections are a cause of encephalopathy. Many types of bacteria, viruses, and fungi can cause encephalitis by infection and inflammation of the brain tissue or of the meninges (meningitis) that line the brain and spinal cord.