Before our amazed eyes was a white unicorn.
Why is unicorn the subject of the sentence instead of eyes? It is because the preposition "before" that was placed in front of the words "amazed eyes"?
Before our amazed eyes is a prepositional phrase. As you say, it's the use of before that determines this.
Your sentence is just an inverted version of the following:
[A white unicorn] was before our amazed eyes.
Changing the order of the components (in this way and in this sentence) doesn't change their syntactical roles.