If he learned the truth, he'd be terribly surprised.

Literal

By-chance, that fact [object-を] knew-[conditional-たら] he [topic-は] terribly will-be-surprised [probably-だろう].

知る ('to learn/find out') combined with たら conditional expresses 'if [he] learned X.' ひどく is the adverbial form of ひどい ('terrible, awful, severe') — used here as a pure intensifier: 'terribly surprised.'