THE Mayo Clinic is on track to run 140,000 tests this year for autoimmune disorders of the brain, about a 20 percent increase over last year. One-tenth of samples usually come back positive for the self-directed antibodies indicative of autoimmunity, said Sean J. Pittock, a neurologist there. Many of these patients have cancers, which can trigger an attack. But a fraction have an autoimmune disease of the brain.

“There are people out there who are very ill and in nursing homes, and their condition is treatable and reversible,” he said. “And they’re being missed.” It’s rare, but he estimates these patients to number in the many thousands.

One such story comes from the journalist Susannah Cahalan whose memoir “Brain on Fire” details her bout with autoimmune encephalitis. Her sudden descent into “madness” resembled a psychotic break. And just a few years earlier, before the condition was understood to be autoimmune, she might have been considered lost to psychosis and institutionalized. But in 2009, Ms. Cahalan, the 217th patient to get the diagnosis of what’s called anti-NMDA receptor encephalitis, was treated for her autoimmune disorder and recovered.

Celiac disease differs from most other autoimmune diseases in one critical respect: The trigger, gluten, is known. And in most cases, removing gluten will turn off the autoimmune destruction in the gut. Around 10 percent of people with celiac disease, and possibly more, are thought to suffer neurological symptoms, ranging from headache and nerve pain, to ataxia and to epilepsy.

When I called Alessio Fasano, director of the Center for Celiac Research at Massachusetts General Hospital in Boston, he spoke of his own celiac-related miracle stories. In one, a boy with autism-like symptoms actually had undiagnosed celiac disease, and recovered on a gluten-free diet. Dr. Fasano told me he had seen a few similar cases in his native Italy.

In another, a former professor diagnosed with dementia and institutionalized, recovered on a gluten-free diet. Her doctors knew she had celiac disease, but thought it irrelevant to her degenerative brain disorder.

Some researchers have proposed autoimmune mechanisms to explain these phenomena. The presence of antibodies that bind to an enzyme called transglutaminase 2 is used to help diagnose celiac disease. Among other functions, transglutaminases help seal barriers in the body. Scientists at the Royal Hallamshire Hospital in Sheffield, Britain, have identified an antibody that binds to a version of transglutaminase, called TG6, which occurs primarily in the brain.