Generally speaking the title “the Great” is not necessarily one given by the Church but by the people of God.
Popes traditionally listed as “the Great” are Leo I, Gregory I, and Nicholas I. They were Popes that led the Church during times of crisis and were renowned for their extraordinary leadership, vision, and impact on the Church. Throughout history people when distinguishing which Pope they were referring to didn’t use their number (i.e. “Pope Leo the First”) but instead would simply say “Pope Leo the Great.” And because the popular title was practically universally recognized as appropriate it stuck.
When Pope John Paul II died, many people looked over his life and considered his leadership, vision and impact on the Church to be truly extraordinary and deserving of the title “the Great.” Whether this title will stick to Pope Saint John Paul II will be determined by the judgment of Catholics through history.