The mystery of how Mr. Roarke accomplished his fantasy fulfillment was strongly associated with the franchise's success. There were several very strong teasers and Easter eggs in the episodes however.
In the episode Elizabeth Mr. Roarke is visited by a woman from his past, and late in the show it is revealed that she died 300 years ago. He had great access to many powers, even time itself, as we saw when he sent one guest back in time to study Jack the Ripper (With Affection, Jack the Ripper; Gigolo, 1980), he came back to rescue her from death. The list of mysterious powers he has used would be quite large for this answer, but as to what exactly he was and where the powers come from, only Ricardo Montalban himself had that answer. From The Devil and Mandy Breem we know that he was in fact immortal as Mephistopheles himself reminds Roarke saying,
Thanks for the game Roarke. We will play again. We have all eternity
This was in response to Mephistopheles losing a bid for the immortal souls of three island guests. We also learned that he had authority to negotiate with the Devil for souls, yet he was still bound by strict rules. This rules out the possibility that he was God himself, but clearly has authority given from God. Even after that episode people still wanted to know exactly what his character was, and he held his identity tightly until late in life. He finally revealed that his inspiration for Mr. Roarke was the idea of a fallen angel, cast out of Heaven for the sin of pride. The island was the one place his power remained, it was his purgatory and he could never leave. Tatoo was a cherub assigned to attend him:
He's not the devil… what is he? What is he? Even though the audience didn't realize what I was thinking… I decided this man was an angel who still had a little sin of pride in him… so he is in charge of purgatory, and he has his little cherub to help him.
There is nothing I could find connecting his character with any sort of magic or pagan entity, or even to one of the three named angels; Gabriel, Raphael, or Michael. In fact Mr. Roarke is actually able to command the genie Joe to undo one of the wishes the genie's master wasted, so he is not beholden to pagan magic and simply ignores those rules. It is likely the creators wanted the audience to enjoy whatever whimsical fantasy they desired with regard to his origins. In this way they could create a wide array of fantasies with no obligation to put his powers into a rigid box. Montalban himself clearly attributed his character's powers to a supreme God having dominion above all other beings.