This quote leads me to believe he was agnostic, but I'm not sure. Googling the question does not provide me with any answers. So if you know about his religious beliefs, please answer me in the comments :)
This quote is likely aprocryphal. Stoicism works very well with religious belief. I do not know where this quote comes from specifically, but it seems to have been derived from "The Meditations" 2.11.
"Now departure from the world of men is nothing to fear, if gods exist: because they would not involve you in any harm. If they do not exist, or if they have no care for humankind, then what is life to me in a world devoid of gods, or devoid of providence? But they do exist, and they do care for humankind: and they have put it absolutely in man's power to avoid falling into the true kinds of harm."
"The Meditations" was written by Marcus's own hand, and did not see publication during his life time. The work does not seem to have been intended for publication, and contains very personal thoughts. I think he sincerely believed in gods, but I hesitate to give you more than that. I do not have a quote from him naming specific gods.