Gluten has been linked to playing a role in causing headaches and migraines. That role mainly involves how gluten causes inflammation within the gastrointestinal tract. The presence of gluten in the digestive tract causes an autoimmune response that releases cytokines. Those cytokines enter the brain and, as a result, produce brain inflammation that cause headaches and migraines.