Caught off guard, I was at a loss for a reply.

Literal

Surprise [object-を] was-struck [then-て] I [topic-は] reply [at-に] was-troubled.

不意を突かれて is the passive of the set phrase 不意を突く ('to catch off guard'). 返事に困る means 'to be troubled about a reply' — 困る takes に to mark the thing causing difficulty. A natural way to express being at a loss for words.