The flu kept him from playing golf.

Literal

Flu [reason-で] he [topic-は] golf [subject-が] couldn't-do.

流感で (due to the flu) uses で for the cause. ゴルフができなかった uses the potential negative of する — 'couldn't do/play golf.' A simple causal sentence.