The simplest criterion is that I was simply unable to put it down. Then, if I can clearly recall everything that has happened with little effort. Getting more complex, I have to decide if I liked the story and the characters, as well as the setting, the dialogue, the themes, and the tone. At the most complex level, I have to decide whether I enjoyed the prose itself.
A truly great book excels at all of these things, even if it goes unnoticed by the ones who put the classics compilations together. To me, something more casual like Mike Resnick's "Santiago" or Neal Stephenson's "Snow Crash" is just as great and maybe even as important as noted classics like Oscar Wilde's "The Picture of Dorian Gray" and Ralph Ellison's "Invisible Man."