When I first started writing about issues involving celiac disease, it really struck me how many celiacs suffered from migraines. Surely, there has to be a connection, I thought.
It turns out that there likely is a connection, although (as with many medical conditions associated with celiac disease), it's not at all clear what that connection involves. It could be that the genes that predispose you to celiac also predispose you to migraines, or the connection could be causative -- i.e., gluten ingestion causes migraines.
Although there's no scientific proof, I tend to think it's the latter explanation. That would explain why I get migraines only when I accidentally ingest gluten. In my case, it seems that barley causes the worst symptoms; known wheat cross contamination doesn't seem to lead to a migraine.
I've detailed what we know -- and what we don't know -- about the connection between gluten and migraine headaches in my article Celiac Disease and Migraine.
There's certainly plenty of research left to be done. But anecdotal evidence indicates that a gluten-free diet can help lessen the frequency and severity of migraine headaches in some people, making it well worth trying, in my opinion.