The painting on the wall caught his eye.

Literal

Wall's painting [subject-が] his eye [to-に] caught.

目に留まる is an idiom meaning 'to catch one's eye' — literally 'to stop at one's eyes.' 壁の絵 is the subject that does the catching. The が marks the picture as the active agent in this intransitive expression.