In the Bhagavad-Gita-Mahatmya, Bhagavan Vishnu says to Dhara:
gitAm Ashritya vahabo bhubhujo janakAdayah/nirdhutakalmashA loke gatAste paramam padam//
Meaning: Many kings like Janaka washed off their sins in this world by acting according to the Gita and get liberated.
Janaka took birth in the Treta yuga,while Gita was told in the Dvapara yuga.
How could Janaka study Gita?
The same Mahatmya mentions that Gita has 745 slokas by the way and therefore by Gita it does mean the entire Gita I think.