People with celiac disease have likely been malnourished for some time before their diagnosis. Malnutrition can lead to many problems, including depression, irritbility and forgetfulness. From Dr. Peter H.R. Green’s book, “Celiac Disease, A Hidden Epidemic”:

Depression may be due to the malabsorption of nutrients. One study suggested that malabsorption could interfere with the neurotransmitters that regulate mood. Researchers found a possible link between brain function, depression, and malabsorption because of abnormalities in the metabolism of monoamines (serotonis, dopamine, noradrenaline). They felt that a high number of food factors are involved in monoamine synthesis and concluded that depression and anxiety disturbances found in celiac disease and IBD could be secondary to a reduced neural production of monoamines.
Another problem with nutrient malabsorption is a deficiency of folate (folic acid). From ”Celiac Disease, A Hidden Epidemic”:
A deficiency of folate (folic acid) was shown to increase irritability and forgetfulness. Folic acid is a vitamin that is necessary for the formation and growth of blood cells and is used in cell division. A deficiency plays a role in neurological defects in newborns, anemia, blood disorders, and GI disturbances, and was proven to cause depressive symptoms including fatigue and apathy.
Since folic acid is best absorbed in the duodenum, people with celiac disease may suffer from a deficiency. The link between this and depression is unclear, but interesting.
The malabsorption of other nutrients may contribute to depression. Vitamin B12 deficiency will also contribute to depression as well as dementia (memory problems). Once the intestine has healed, absorption improves, and the effects of these deficiencies should resolve.
The book goes into greater detail on the subject of depression and you may want to read it for more information.
[...] Celiac Disease — glutenfreekathy @ 8:00 am Many people have been interested in my blog on celiac disease and depression. I have found an article on Celiac.com which may be of interest to you. It is regarding a [...]