When Charles Dickens’s death was announced in June 1870 the young daughter of a London costermonger asked anxiously: “Mr Dickens dead? Then will Father Christmas die too?” The story has been handed down the generations like a recipe for plum pudding, savoured for the deft way it knits the novelist and the midwinter festival together into one cosy stocking. Just the phrase “costermonger’s daughter” suggests all sorts of Dickensian themes – city grime, cheap street food, the capacity of innocent children to rise lispingly above the squalor of their circumstance. But what often gets missed is the way that the little girl’s question – if she really existed, if she ever said it – assumes how vulnerable Christmas is. Just like Mr Dickens, it could be snatched away at a moment’s notice.

It is 175 years since Dickens published A Christmas Carol, the 28,000-word novella that lay down the template for how we now celebrate (or make a point of resisting) Christmas. Prince Albert and his imported fir tree of 1841 made a contribution, of course, and so did Henry Cole and his Christmas cards of 1843, and a London sweet-maker called Tom Smith who came up with crackers in 1847. But Christmas was pulled together, codified, made visible in story and painted in sound by Dickens who dashed down A Christmas Carol in six weeks in the autumn of 1843. The book, published on 19 December of that year, famously tells the story of Ebenezer Scrooge, a bitter old miser who is given a chance to redeem himself when he is visited in turn by four ghosts on Christmas Eve. As a result of their warning about what will happen if he fails to change his ways, the grasping old skinflint repents of his life-denying selfishness. Flushed with goodwill, he lavishes a delicious Christmas dinner on the family of his shabby and exploited clerk, Bob Cratchit.

To mark the anniversary of A Christmas Carol, the Charles Dickens Museum in Clerkenwell, London, has mounted an exhibition that is replete with all the signifiers of what has become known as a “Dickensian Christmas” but which is also, simultaneously, Dickens’s Christmas. From 1837 to 1839 Charles, his wife Catherine and their growing brood lived at 48 Doughty Street in a solid late-Georgian terrace. On display you will find the silver punch ladles with which the master of the house liked to spoon out the boozy, lemony festive drink that he made each year according to his own recipe. In the back kitchen you can see the family “copper” – a built-in brick water heater – in which Mrs Dickens simmered the plum pudding, just as frazzled Mrs Cratchit does in A Christmas Carol (since the copper was mostly used for boiling laundry it’s no surprise that the Cratchits’ pudding comes out smelling slightly of soapy old sheets). The drawing room at Doughty Street, meanwhile, is decked with the boughs of holly and mistletoe that gleam so brightly in Chapter 28 of The Pickwick Papers when Mr Pickwick, Sam Weller and their posse descend on Dingly Dell on 22 December for a fortnight of mid-winter frolic.

It was at Doughty Street, and later at the nearby addresses to which he moved his family, that Dickens would habitually enact his version of the festival. “Christmas was always a time which in our home was looked forward to with eagerness and delight,” recalled his eldest daughter, Mamie, who was born at Doughty Street. Younger brother Henry chimed in: “My father was always at his best, a splendid host, bright and jolly as a boy and throwing his heart and soul into everything.” Guests would be offered a turkey dinner followed by a dazzling display of magic tricks courtesy of Boz himself. Dickens had only to wave his hands over a gentleman’s top hat for a steaming plum pudding to emerge; a box of bran was transformed into a live guinea pig. Even Jane Carlyle, a regular guest who could generally be counted on to say something spiky, was obliged to admit that Mr Dickens was “the best conjuror I ever saw (and I have paid money to see several)”.

A haunting vision ... an illustration from A Christmas Carol. Illustration: Alamy Stock Photo

Yet, as this thoughtful exhibition hints, Dickens’s hectic high spirits – at one point, says Mrs Carlyle, the naturally abstemious novelist appeared positively drunk with delight at his own sleights of hand – were driven by something darker. You have only to look at the novels to see how Christmas is often skating on thin ice. In Great Expectations Pip passes on a pork pie intended for Christmas dinner to the escaped convict Magwitch, a good deed that will blight his life. In The Mystery of Edwin Drood, the young hero goes missing on Christmas Eve, leaving behind several clues that he has been murdered by his uncle. Saddest of all, in A Christmas Carol, Scrooge is forced by the Ghost of Christmas Past to observe himself as a boy abandoned at school over the festive season, and weeps “to see his poor forgotten self as he used to be”.

Dinner parties chez Dickens were a theatrical performance – a minute’s lateness was greeted with coldness

The real-life roots of Dickens’s affinity with hunger, dispossession and cancelled Christmases have been identified many times. One nightmarish year when he was 12, young Charles was deprived of a home life following his feckless father’s imprisonment for debt. Wrenched out of school, the boy was set to work in a rat-infested blacking factory on the banks of the Thames, returning each night to grim lodgings in Camden Town. Permanently ravenous, on his daily stomach-rumbling walk to work he would stop in Tottenham Court Road to spend his precious dinner money on a stale half-price pastry. So great was the trauma of this shameful year that as an adult Dickens divulged the details only to his best friend John Forster and Catherine. It is all there, though, in David Copperfield, his autobiographical novel of 1849-50, as well as in the narratives of those other fledgling boy heroes who have fallen out of the familial nest and now live unloved and hungry: Nicholas Nickleby, forced to drink watered-down milk by his schoolmaster, Oliver Twist daring to ask the workhouse beadle for more.

This disintegration of Dickens’s early family became a psychic wound that he felt compelled to heal again and again. Hence the continual, one might say compulsive, need to assert his adult domestic happiness to both friends and strangers. Dinner parties chez Dickens amounted to a kind of theatrical performance. The curtain went up punctually – guests were typically asked to arrive for dinner “at ¼ before 7 o’clock” – and a minute’s lateness was greeted with a disproportionate coldness. The props too were a tad stagey, putting one in mind of the nouveau riche Veneerings from Our Mutual Friend: “everything about the Veneerings was spick and span new. All their furniture was new and “the surface smelt a little too much of the workshop and was a trifle sticky”. Even kindly Mrs Gaskell couldn’t help repeating a rumour she’d heard about the Dickenses’ dinner service being solid gold. It wasn’t, of course, but there were monograms on everything, including the fish slice, which struck some guests as a bit of an over-reach for the son of a bankrupt naval clerk.

There was something oppressive, too, about the elaborate courtesy with which the guests were garnished. Besides each place-setting there was a nosegay for the ladies and a buttonhole for the men. There were “quantities of artificial flowers” (snide Jane Carlyle again) up and down the table, which was itself groaning with “overloaded desert! Pyramids of figs, raisins, oranges”. William Thackeray, yet to hit pay dirt with Vanity Fair and therefore feeling murderous about his literary rival’s sudden access to cash, couldn’t resist bitching to his mother about Mrs Dickens’s penchant for “pink satin” and her dandyish husband’s suspiciously ringleted hair. The couple, he reported gleefully on another occasion, were “abominably coarse” and “vulgar”.

The particularly observant guest might have noticed other signs that something was amiss in the Dickenses’ strenuous performance of middle-class domestic bliss. According to the gender codes of the mid-19th century, married couples were expected to organise themselves around the principle of “separate spheres”. For the lady of the house that meant running her increasingly lavish home “like the Commander of an Army” (Mrs Beeton), supervising servants and ordering food. The master meanwhile busied himself earning enough money to pay the bills for all those curtains, carpets, housemaids and fish slices that were now considered bare necessities for anyone who aspired to a certain level of bourgeois gentility.

Daring to ask for more … The 1960 musical Oliver! Photograph: Allstar/Romulus

But it didn’t work that way in the Dickens household. Documents, including some on display at Doughty Street, reveal that it was he, rather than Catherine, who ran the household. It is Mr, not Mrs, Dickens who frets about ordering a hamper from Fortnum & Mason, who drools over a fine piece of venison at the butchers, who sacks a sulky cook. Rumours about Dickens’s control freakery, in particular his habit of compulsively rearranging the furniture, had long circulated around literary London. But this appropriation of an active housekeeping role struck observers as downright weird. Nathaniel Hawthorne wondered out loud about Dickens “making bargains at butchers and bakers, and doing, as far as he could, whatever pertained to an English wife”.

All this might have been understandable had Catherine been a slapdash housekeeper or a terrible cook. But the evidence to hand suggests the exact opposite. In 1851 she pseudonymously published What Shall We Have for Dinner?, a highly useful and popular – four reprints followed quickly – set of meal plans that encompassed everything from a smart dinner for 20 to modest family suppers. Ten years before Mrs Beeton, Mrs Dickens was organising her Bills of Fare according to what was seasonal (for which read good, wholesome and cheap) and which combinations of food would cook best on an open range, a complicated piece of kit which required a precise choreography of pots, pans and naked flame. What Shall We Have for Dinner? was a manual for real housewives who had real budgets: showy spectaculars such as “Grenadine of Veal” and “Charlotte Russe” are balanced out with plenty of suet dumplings, raspberry jam sandwiches and endless mashed potato. The busy housewife, getting supper without the benefit of a professional cook at her elbow, would also be thankful for Mrs Dickens’s many suggestions for cold beef and lamb, not to mention the variety of ‘made dishes’ knocked up from yesterday’s left overs.

With A Christmas Carol, Dickens made a shrewd, calculated attempt at writing what today we’d call a stocking filler

Everything suggests that Charles Dickens was fully behind What Shall We Have for Dinner?, a rare surviving copy of which can be seen at Doughty Street. He wrote the pseudonymous introduction and arranged for the book to come out with his own publishers. So it is unnerving to discover that, behind such a ringing endorsement of domestic theology, Dickens was busy retreating from the whole confected caper. In his introduction he issues a warning that, if women don’t learn to be better housekeepers, they have only themselves to blame if their menfolk start spending evenings on the town and at their clubs. Which, it turns out, is exactly what he was doing himself. It was during the Doughty Street years that Dickens secured election to both the Garrick and the Athenaeum, gentlemen’s club for men who preferred a home-away-from-home rather than Home itself. Then, from the early 1850s, it was noticeable that Dickens was presiding over fewer dinner parties with Catherine, preferring instead to invite people to supper at his “gipsey tent” AKA the Covent Garden office of Household Words, the weekly magazine that he edited. Crates of champagne and claret were ordered in advance, and the food was sent in from the hotel around the corner. “I loathe domestic hearths, I yearn to be a vagabond!” he wrote to a friend in 1848, in what was supposed to be a joke but sounds like a cri de coeur.

When the final marriage separation came, in 1858, Dickens was quick to put it about that the relationship had failed because Catherine was a bad housekeeper and even worse mother. To one friend he wrote of his wife and the children that she “has never attached one of them to herself, never played with them in their infancy, never attracted their confidence as they have grown older”. The fact that he had fallen in love with another woman and wanted to be free to embark on an affair was apparently neither here nor there. Instead, opprobrium was heaped on Catherine by the Dickens camp, led by Forster, who managed to imply, without quite saying, that Mrs Dickens’s increasingly large girth and what Dickens termed her “mental disorder” was the result not of 12 pregnancies and accompanying postnatal depression, but rather a failure to keep her appetites within bounds. Catherine’s enjoyment of food was used as a weapon against her for many years, with one influential literary biographer even attributing the “famous breach” partly to her being too fond of her own recipes and becoming, while still young, “mountainously fat”.

Good deeds … Alec Guinness, left, with John Mills in the 1946 film of Great Expectations. Photograph: ITV / Rex Features/ITV/Rex Features

So it should come as no surprise that A Christmas Carol, with its message about family cohesion, the forgiving of slights and, above all, the sacramental quality of a really plump turkey, is a text that everywhere strains with ambivalence. For one thing, there’s the obvious conundrum that a tale written to preach about the blighting effect of financial profit and loss on human relations was actually conceived as a money spinner. By the autumn of 1843 Dickens, who at 31 no longer counted as a boy wonder, was having to face the fact that his early commercial and critical success were over. In contrast to the great triumphs of Oliver Twist and Nicholas Nickleby, his current novel, Martin Chuzzlewit, wasn’t selling. It even looked as if the Great Boz might be required to pay back some of his handsome advance to his publishers Chapman & Hall. His home life wasn’t easy either. Catherine was expecting her fifth child, Dickens’s father, the Micawberish John Dickens, was sponging off his son, and the rent on the new family house at Devonshire Terrace was proving punitive.

So Dickens made a shrewd, calculated attempt at writing what today we’d call a Christmas stocking filler. The publishing market had been changing its rhythms radically in recent years, with the festive period now emerging as the peak time to release new titles, partly as a consequence of the way that cheap print allowed ordinary working people to give books as presents. Dickens was also clear that he didn’t want to be in the position of having to split the profits with anyone, so he decided to publish at his own expense, bypassing Chapman & Hall completely.

We know how the story ends. Ebenezer Scrooge learns that relationships are not about paying the least you can get away with and shutting yourself up in the prison of your lonely heart until you crumble into dust. He learns to love, not in the romantic sense (there will be no Mrs Scrooge), but in the familial sense of giving away his affection to his estranged nephew and his impoverished clerk’s family, expecting nothing in return, and yet gaining everything in this new universe of feeling.

But there is another story here, and we know how that one ends, too. Dickens may have conceived of A Christmas Carol as a quick and clear-sighted punt on the British public’s increasing hunger for novelty books, but that doesn’t mean that it didn’t work its own transformative magic on him as well. Forster reported that he “wept over it, and laughed, and wept again, and excited himself to an extraordinary degree”. “He walked thinking of it fifteen and twenty miles about the black streets of London”, often at very late hours of the night. That year he kept Christmas with an extraordinary zest; “such dinings, such dancings, such conjurings, such blind-man’s buffings, such theatre-goings, such kissing-out of old years and kissing-in of new ones, never took place in these parts before”. For one brief midwinter moment Dickens seemed to have healed his relationship with his traumatic past and a present that was beginning to show hairline fractures by plunging into warm Christmas cheer, a cheer that he worked hard to conjure into being. It couldn’t last of course, and it didn’t.

• Food Glorious Food: Dinner with Dickens, curated by Pen Vogler, is at the Charles Dickens Museum, London WC1N, until 22 April.