What you have is a noun clause that begins with that.
That-clause as a noun clause
A that-clause is an example of a noun clause. It can be the subject or the object of the verb.
The that-clause is "that evils had power" and the given sentence (in OP) is grammatical. Such a construction might not be used as frequently as others. For example, one might instead write
The idea that evils had power was believed in the olden days.
When talking about a fact, one could use "the fact" instead of "the idea".
Another example would be
It was believed in the olden days that evils had power.