This is a difficult question to answer. Either he’s a real spirit haunting The Overlook with the power to open a storeroom door or he’s a figment of the Jack Torrances’ own imagination. There is no in-between. I believe he's a vision produced in Jack's irrational mind but It’s hard to definitively prove this. Stanley Kubrick hides the answer to this question very well. But if you think about these seven points that he put into the movie it will help you to come to your own conclusion and you'll see why I believe Delbert Grady is a figment of Jack’s imagination. Click on each point for an explanation.
1) It’s well hidden but if you look at the dialogue Stanley Kubrick and Diane Johnson put the answer to this question right in the script and it can’t be changed.
2) Every time Jack sees a “ghost” he’s looking at himself in a mirror.
3) Who let Jack out of the storeroom if Grady is not real?
4) Why didn’t Grady “correct” Danny and Wendy himself?
5) Grady is not in the final photo.
6) How did Stanley Kubrick alter Stephen King’s novel?
7) We see him and hear him speaking to Jack.
8) What does Stanley Kubrick have to say about Delbert Grady?