As the immune system matures in late fetal development, there's a stage when all cells that can target self antigens get killed. However, some tissues are isolated from the immune system, and so there are antigens there that don't get on the "self list". The thyroid is one of them.
Everything is OK until the thyroid gets damaged, infected or whatever. Then the immune system can see it, and may develop cell and antibody mediated responses.
Like all proteins in food, gluten is normally digested, and never makes it out of the gut intact. Only the component amino acids are transported to the bloodstream. However, in celiac disease, where the gut lining is damaged, I can imagine that some gluten gets across intact. Also many other proteins and complex carbohydrates.
Then the immune system could respond to all that stuff. And some of it could share epitope with thyroid components. So if there is an association between gluten and Hashimoto's thyroiditis, it's hard to say whether gluten shares epitopes with thyroid stuff, or whether it's just damaging the gut.
Yes, but it usually works the other way around, i.e. the immune system should not recognise the "specific gluten protein" because it looks like self. After all the microbe(?) that produces it is trying to survive by looking like its host, it isn't trying to induce thyroiditis in its host.
Another common case is mimicry of the A, B blood antigens and the Rhesus factor. Patients that are AB+ treat A,B and Rhesus factor as self and so can accept blood from any donor (i.e. AB+ is the universal recipient). In contrast, O- patients who do not treat A,B and Rhesus factor as self and due to mimicry will likely treat them as foreign bad (as opposed to foreign neutral), so if they receive a transfusion from any other blood type the immune system will attack the transfusion. Since O- lacks A,B and Rhesus it is the universal donor.
> any suggestions where to start?
The topics fall under microbiology / immunology, so Ugrad textbooks, Wikipedia etc.