I was really surprised by her sudden change of heart.

Literal

I [topic-は] her [attributive-の] sudden [attributive-の] change-of-heart [at-に] very surprised.

突然 ('sudden, abrupt,' a な-adjective/noun; 突然の modifies attributively). 変心 ('change of heart, change of mind,' a Sino-Japanese compound). 驚く ('to be surprised') takes its cause with に. A romantic/emotional reaction.