She thought John had loved her at some point in the past.

Literal

She [topic-は] John [subject-が] previously loved-for-her had-been [quotative-と] thought.

A deliberately tense-tangled sentence. The outer 思った ('thought') sets a past reference frame, and the embedded 愛してくれていた ('had been loving for her') uses ~ていた to describe a past ongoing state — so the love existed during a stretch of time prior to her thought. The benefactive ~てくれる ('do for me/the in-group') makes the love feel directed at her specifically — without it, the sentence would sound clinical; with it, the inward emotional pull is unmistakable. The quotative と embeds the entire belief as a clause. Notice how Japanese keeps the embedded tense aligned to its own internal time, rather than back-shifting it to match the outer verb the way English does.