This is an excellent topic to think about in relation to this wonderful novel. You are, of course, completely right. There is every sense in which Dickens intentionally modelled the beginning of his story at least on some kind of fairy tale. Note the way in which Pip has a rags-to-riches moment. His mysterious benefactor, which he and we assume is Miss Havisham, seems to play the part of the fairy godmother, intending Pip to marry his princess, Estella, and giving him tremendous wealth and education to enable him to do this. He is transported from his poor and humble house in the marshes to London to begin his great expectations.
However, crucially, throughout the text, at every stage there is always a hint that everything is not quite right about this fairy tale that Pip is experiencing. What kind of fairy godmother is Miss Havisham, who encourages her ward to "break" Pip's heart and treat him so savagely? Estella herself hardly plays the role of beautiful princess. She is beautiful, yes, but condescending, proud, heartless and cold. In addition, the way in which Pip is haunted at every turn by crime and criminals and the description of London is bleak, dark and depressing seems to indicate the way in which Pip's great expectations are associated with his own corruption. What is more, there are hints in the text that indicate that Pip's move up in the world is only a move downwards in terms of his own character and happiness. Consider what the text tells us at the end of Chapter Eighteen after Pip has received news of his prospects:
I put my light out, and crept to bed; and it was an uneasy bed now, and I never slept the old sound sleep in it any more.
The arrival of wealth has not made Pip's life any easier. In fact, it is the opposite, as his carefree days of sound sleep and comfort have been lost.
This distortion of the fairy tale continues when we realise who the fairy godmother of the piece is, and we, and Pip, are horrified by the revelation. This story is based on a fairy tale, yes, but at the same time it is almost a perversion of one.
In addition to the excellent points made above, the setting is certainly a distortion of the fairy tale. For typcially, a fairy tale has the action occurring in a faraway time in a enchanted land. However, Dickens has his tale as a contemporary one that is far from enchanted. London is portrayed with no castle, indeed, as Pip is greeted on his arrival by Newgate Prison and the "great black dome of St. Paul's" cathedral instead. Pip and Herbert live in Barnard's Inn,
the dingiest collection of shabby building ever squeezed together in a rank corner as a club for tomcats.
Of course, the "castle" where Estella, a complete perversion of the sweet princess, lives is in gothic decay. Indeed, there is no enchantment as Dickens exposes the evils of contemporary Victorian society that neglects orphans and has a dirty city ridden with crime and injustice. Mr. Jaggers, who also is a perversion of the protector, is himself little better than the criminal element that he defends.
Pip himself represents better the prodigal son than the charming hero of a fairy tale. He completely rejects his loving Joe and turns to the materialistc desires of wealth instead. And, the ending is anything but happily ever after as Pip loses his wealth which was provided by a criminal rather than any fairy godmother or magic. (Magwitch whose name suggests magic witch). He returns home in poverty, instead, although he has improved his character.