Ayn did as well as she could with atheism. However she rode on the coattails of some very theistic ideals. This is called sawing off the branch upon which you sit.
The message is important; the messenger not so much. Like MLK, who was an imperfect messenger, but the messages of non-violence and content of character were valid. Ayn Rand’s message on the ill effects of socialism is valid.
Imagine if you were smart enough to detect the truly heinous forces at work in the world and what would happen, but still blind to the truth and hope offered by God. Well, you might search for worldly solutions to fight back with, but you cannot fight the world with the tools of the world and win.
It would either drive you to hopelessness and desperation, or to some pretty far out precipices in search of a novel solution to the problem. Thats where she ended up.
Like everyone, she got some things right, and some things wrong.