In both X-Com 1 and 2, the Ethereals referred to a great pending threat that humanity was needed to help combat:
"We who were doomed to feed on the Gift of lesser beings… as we sought to uplift them… to prepare them… for what lies ahead." This threat per X-Com 2 is said to be psionic in nature.
I've a theory that the Gatekeeper alien in 2 is in fact a specimen of this threat, albeit one that the Ethereals were able to subvert, possibly via the mechanism of its shell. Autopsy reports have termed it to be an
"unusually independent, unpredictable species" one with
"immense Psionic power potentially rivaling that of the Elders themselves". Further:
"our efforts to analyze the subject have so far revealed little in terms of its actual purpose or intention in the field". This implies that unlike virtually every creation/augment of the Elders, each of which serves an unambiguous purpose, strategic or tactical niche, the Gatekeeper stands separate as something 'unusually independent and unpredictable', lacking a clear role which implies it is not something they fabricated, and in turn, something likely external that they've incorporated on an impromptu basis.