She looked as though she'd been bedridden for years.

Literal

She [topic-は] illness [with-で] many-years lying-was [like-ような] face [object-を] was-doing.

何年も寝ていたような顔 — a relative clause modifying 顔: 'a face as if she'd been bedridden for years.' ~ような adds the comparison.