My understanding from my own research is that gluten irritates the gut lining. It does this in everyone, but some people are more sensitive and others are more tolerant. Eventually, in more sensitive people, the gut lining becomes so irritated that a person develops Leaky Gut Syndrome, where larger-than-normal food molecules are allowed to pass into the bloodstream. Since they don't belong there, the immune system attacks - which is normal. However, in some cases (either by genetic predisposition or by having another virus at the wrong time) the wrong immune receptors are triggered, thereby creating an autoimmune disease (in my case - Hashimoto's thyroiditis - my thyroid antibodies were triggered).
By going 100% gluten free for at least 3-6 months, the gut lining may be allowed to heal, therefore turning off the immune reaction. I say "may" because for many people it takes more than just avoiding gluten - they may have to also avoid corn, rice, dairy, soy, nuts and nightshade vegetables in order to achieve optimal healing.
For what its worth - I was able to reduce my anti-thyroid antibodies by 20% after 8 weeks of 99.9% gluten free. I am hopeful that if I can stick to 100% gluten free for a full 3-6 months I may be able to get my thyroid antibodies into the normal range. If it lowers but still isn't normal I will try eliminating some of the other items I listed.