HELL to the no.
Photorealism is not an indicator of quality. Even "realism" in and of itself has nothing necessarily to do with how good art is; quality in creative expression is, as has been mentioned, largely subjective. With art, we convey our personal perspectives that no one else in existence can have exactly the same. To that purpose, we cultivate our own styles so as to convey to someone else what we perceive and how we perceive it. A part of us should be in everything we do, in art.
But I could discuss and debate purposes behind art and meaning behind art endlessly. I just want to say that no, absolutely not, photorealism in art is not an indicator of quality or greatness at all. This is too often pushed by people -- sometimes even people who should know better, like instructors, legitimate critics, and the like -- as a reality. It is not.
A lot of people never think about why so many of the "great masters" of art painted in this way or that, but there are social and cultural reasons and influences, as well as the fact that most artists throughout history (and even now) depended on patronage, on people actually paying them to continue working in art. Before photography existed, we had painting. If you had money, you'd likely want yourself to be immortalized, after a fashion, on canvas. These were not super-accurate portrayals either! They were stylized and, in most cases, what we would now say "photoshopped" or "airbrushed" -- you didn't want features you didn't like being immortalized, after all, and you were paying money for this!
People have looked back to imitate craftspeople and creators they regard highly. But really no movement is that different than any other in terms of function; we are all trying to express ourselves and, naturally, we look to those who have done that in their lives to take what we can, learn what we can, and try to make our own distinctive voices heard in that way ourselves.