“As the words were spoken, they passed through the wall, and stood upon an open country road, with fields on either hand. The city had entirely vanished. Not a vestige of it was to be seen. The darkness and the mist had vanished with it, for it was a clear, cold, winter day, with snow upon the ground.”

No time machine, no fancy science, but this was the first time-travel jump in modern fiction. In A Christmas Carol (1843), Scrooge is led by the Ghost of Christmas Past on a journey of Christian redemption to save his soul. As he says by his third visitation:

“Ghost of the Future!” he exclaimed, “I fear you more than any spectre I have seen. But as I know your purpose is to do me good, and as I hope to live to be another man from what I was, I am prepared to bear you company, and do it with a thankful heart. Will you not speak to me?”

Dickens wasn’t the first Western writer to attempt time-travel fiction – but he was the first to make an impact. (Irish writer Samuel Madden’s 1733 Memoirs of the Twentieth Century, a Swiftian anti-Catholic satire, predates it by 100 years, but it was suppressed and most copies destroyed.) In A Christmas Carol we can trace a line back to medieval morality plays and John Bunyan’s Pilgrim’s Progress. Yet the story still resonates in our more secular age because time travel opened up the exploration of both personal and social redemption: Ebenezer Scrooge is reinvented as a millionaire philanthropist. William Morris later imagined a future socialist utopia in News from Nowhere (1890). And there was surely something of the Victorian medieval Gothic revival in art, design and architecture that fuelled a fascination with bringing the past alive in the present.

The time machine is a spaceship for the modern dreamer

Ghosts in the machine

It was the humanist HG Wells who gave us time travel as a metaphor for social inequality, in his factory fodder Morlocks toiling beneath the elite of idle Eloi. He also created the definitive vision of the mechanics of time travel in The Time Machine (1895), “a thing of brass, ebony, ivory, and translucent glimmering quartz”, so beautifully visualised in George Pal’s 1960 film:

"I seemed to see a ghostly, indistinct figure sitting in a whirling mass of black and brass for a moment—a figure so transparent that the bench behind with its sheets of drawings was absolutely distinct; but this phantasm vanished as I rubbed my eyes. The Time Machine had gone."

That image spawned the tech-love of romantic escape. The time machine is essentially an Elizabethan explorer’s galleon or a spaceship for the modern dreamer. Falling in love with the equivalent of a medieval maiden has been a much loved trope from Mark Twain’s A Connecticut Yankee In King Arthur’s Court to Diana Gabaldon’s Outlander books and TV series. They even stuck a time-travel romance subplot into the film-within-the-film Gene Kelly’s trying to fix in Singin’ in the Rain (1952).

Richard Matheson’s Bid Time Return (1975) – filmed as Somewhere in Time (1980) with Christopher Reeve – was inspired by Matheson’s falling in love with a historic portrait, but draws its power from an unusual and gripping method of time travel with heavy consequences.  Hero Richard Collier uses the power of self-hypnosis in a room filled with period objects. A glimpse of a modern penny in his hand is enough to send him hurtling back into the present, physically and mentally broken.

Dystopian future

Matheson had been a soldier in World War Two, and a golden age of time-travel science fiction grew out of storytellers’ collective witnessing of the war’s genocidal horrors. Perhaps the greatest post-war time-travel story is Chris Marker’s La Jetée (1962), which later inspired Terry Gilliam’s 12 Monkeys. Much of the time travel to come in ’60s and ’70s science-fiction films was fun and glamorous, but Marker, who had been in the French Resistance, presented something darker. In his dystopian future, the scientists mutter German as they experiment with time travel on their prisoners in service of their grand mission. The film’s power is matched by Octavia Butler’s novel Kindred (1976), in which a modern African-American woman finds herself transported back to the era of slavery. Both stories are weighted by real physical and psychological anguish.

The song As Time Goes By was actually written about Einstein’s theory of time

The hero of La Jetée is haunted by déjà vu trapped in a loop of time. To understand why we must go back to the 1920s. In the inter-war years Einstein’s theory of time as a fourth dimension utterly transformed our relationship with the past and the future and challenged the Judaeo-Christian concept of linear destiny. The song As Time Goes By – though best known for its use in Casablanca – was actually written in 1931 about Einstein’s theory and is all the more haunting for it.

Déjà vu

A Western fascination with other cultures – notably the ancient Hindu concept of time as cyclical and indigenous Australian ‘dreamtime’– collided with an age of war and aviation technology. As it became possible to view the world from above for the first time in a plane, and thousands of bereaved families attempted to communicate with their lost soldiers through séances and spiritualism, so JW Dunne, aeronautical engineer and philosopher, wrote the bestselling book An Experiment With Time (1927), popularising the idea that all time existed already as a landscape that could be flown above, notably through dreams. Déjà vu was, he explained, the insight of those dreamtime travels. Dunne was a huge influence on JB Priestley, whose time-haunted plays I Have Been Here Before (1937), Time and the Conways (1937) and An Inspector Calls (1945) drew on the idea of the future and the past co-existing.  Déjà vu also drives the narrative of the influential early Ealing horror portmanteau film Dead of Night (1945).

In recent decades Hollywood cinema has often focused on the romance of personal redemption as in Peggy Sue Got Married (1986), Groundhog Day (1993) or the Back to the Future films. But attempts to redeem the world have preoccupied many great science-fiction writers. In Timescape (1980), Gregory Benford fused a story about preventing the assassination of JFK (a frequent idea) with an ecological battle against time to save the planet. Ray Bradbury’s short story A Sound of Thunder (1952) popularised the Butterfly Effect – of small changes affecting large scale future outcomes. There’s an overlap with the whole genre of  ‘what-if’ histories with many dream-like alternate presents and futures such as Philip K Dick’s The Man In the High Castle (1962) set in an America divided between the conquering axis powers.

But we shouldn’t forget the joy of some of our most beloved time-travel fiction: anachronism and historical figures turn out to be rather banal as captured in Bill and Ted’s Excellent Adventure (1989) and especially Time Bandits (1982), which features Napoleon as a height-obsessed despot with a taste for puppet shows.

At the heart of our fascination with time travel is the question of whether you are trapped by it (Sam in Quantum Leap) or whether you are its master. Even a Time Lord like Doctor Who has trouble controlling it. Look again at Dickens’ superficially Christian allegory. In one of the most disturbing scenes in A Christmas Carol, the hungry urchins Want and Ignorance lurk beneath the robes of Christmas Present; a warning to the reader. Time travel might seem like a fantasy of escape, but at its best it is an exploration of consequences and an admission that the future is in our own hands.

If you would like to comment on this story or anything else you have seen on BBC Culture, head over to our Facebook page or message us on Twitter.