The Gorgan

Malevolent entity of Triacus

A noncorporeal being on the planet Triacus that drove a research team to suicide and manipulated their children into hijacking the Enterprise.

The Gorgan was a powerful entity that described itself as the last of an ancient band of marauders sealed beneath Triacus. Unable to act directly, it worked through others, appearing to children as a friendly angel and granting them the power to control adults' minds.
In And the Children Shall Lead, Professor Starnes and his fellow scientists killed themselves under its influence, and their children led the Enterprise toward a populated world. Kirk and Spock played recordings of the children's parents, breaking its hold. Without their belief the Gorgan's true decayed face showed, and it faded away.