。
She was surprised that he had appeared.
Literal
She [topic-は] [he [subject-が] appeared [nominalizer-こと]] [at-に] was-surprised.
驚く ('be surprised') takes に for what surprised the subject. The clause 彼が現れた ('he appeared') is nominalized with こと, then marked に — 'surprised at the fact (that he appeared).' This ~ことに pattern is the standard way to attach an event to verbs of emotion.