Only when you get sick do you truly understand how important health is.

Literal

Sick became [for-first-time-て初めて] health [subject-が] how important [copula-か] [quotative-ということが] well understand [polite-ます].

~て初めて is the key pattern: 'only after doing X for the first time' — you didn't realize it before. どんなに大切か is an embedded question ('how important'). ということが wraps the whole clause as a subject.