Here's why:
* It functions as the object of the preposition "for". The sentence is saying you all had to wait "for something." That "something" is defined by the noun clause.
* It contains a subject ("the surprise") and a verb ("was going to be"). This is a characteristic of clauses.
Let me know if you'd like to explore other types of clauses!