Coeliac disease is one of the commonest conditions seen in Gastroenterology clinics. It is an autoimmune condition, where overactivity of the immune system to certain things we eat results in damage to the gut lining. It is diagnosed by a combination of blood tests and intestinal biopsy, taken via endoscopy. You can find more information about coeliac disease at: 

https://www.coeliac.org.uk/home/

Non-coeliac gluten sensitivity (NCGS) can cause symptoms similar to coeliac disease, but it (probably) does not involve the immune system. Further information on this can be found at: https://www.coeliac.org.uk/information-and-support/coeliac-disease/about-coeliac-disease/gluten-sensitivity/