She came to like the new teacher.

Literal

She [topic-は] new teacher [subject-が] liked became.

好きになる combines the na-adjective 好き with なる ('to become'), expressing a change of state: 'came to like, grew fond of.' The が marks 先生 as the subject of the adjectival predicate, following the same pattern as 好きだ. This construction is common for describing the development of feelings over time.