Thank you for visiting me when I was sick.

Literal

Illness [possessive-の] time visiting [to-に] coming [for-me-てくれて] very thank-you.

来てくれて uses the benefactive てくれる — 'came for my benefit.' どうもありがとう is a common, heartfelt thanks. 病気の時見舞いに来てくれて nests several patterns: 見舞いに来る ('come to visit'), てくれる (benefactive), and the temporal の時.