I discussed Steampunk a little in my answer to Can Someone Explain to Me The Evolution of Steampunk, where I made the claim - a bit subjective, but defensible - that steampunk as a genre had largely been defined by the 1990 novel The Difference Engine by William Gibson and Bruce Sterling, even though several of the visual tropes had been prevalent in much earlier fiction and the actual term "steampunk" coined by K. W. Jeter in 1987.
Gibson and Sterling were both prominent writers in the "cyberpunk" movement of the 1980s. As a mode of fiction, cyberpunk wasn't particularly novel in terms of the actual technological achievements it predicted - human augmentation with technology, space flight, even global computer networks and artificial intelligence had been hinted at or appeared in science fiction of the 1970s, 60s, and earlier. What the cyberpunk authors brougght to their fiction was a kind of aesthetic - high tech contrasted with low life, a disassembly of existing social systems, an increasing alienation of human beings and the world they operated in.
"Raygun gothic" is a term that William Gibson coined in his essential short story "The Gernsback Continuum" (1981) to describe:
At first I wasn't sure what she was talking about, but gradually it began to dawn on me. I found myself remembering Sunday morning television in the fifties.
Sometimes they'd run old eroded newsreels as filler on the local station. You'd sit there with a peanut butter sandwich and a glass of milk, and a static-ridden Holywood baritone would tell you that there was a Flying Car in Your Future. And three Detroit engineers would putter around with this big old Nash with wings, and you'd see it rumbling furiously down some desetered Michigan runway. You never actally saw it take off, but it flew aay to Dialta Downes's never-never land, true home of a generation of completely uninhibited technophiles. She was talking about those odds and ends of "futuristic" Thirties and Forties architecture you pass daily in American cities without noticing; the movie marquees ribbed to radiate some mysterious energy, the dime stores faced with fluted aluminum, the chrome-tube chairs fathering dust in the lobbies of transient hotels.
So William Gibson at the beginning of the 1980s was reflecting nostalgically on the 1950s of his childhood, which in turn was the tail end of the weird science future of tomorrow promised by hundreds of pulp magazine covers and comic books from the 1920s to the mid-1950s. He was looking at the way science fiction and visions of the future age, in a very personal way, because eventually rocket ships ceased to be phallic silver monuments with rocket fins and became the Space Shuttle; the house of tomorrow was not made of plastic and didn't dispense food pills; solar empires with colonies on Mars and Venus were not founded by civilizations where computers were the size of warehouses and calculations for re-entry were completed with a stub of pencil on paper.
In a more general sense, Gibson was reflecting on how the science fiction about technology had changed drastically from his youth. Hugo Gernsback founded the first explicitly science fiction magazine in the 1930s, and he favored what you might call "gadget" fiction - stories about some new piece of technology and what it could do and what impact it would have. Gibson & other cyberpunk authors were also looking at technology, but from a more jaded perspective, because the expectations of Gernsback & other early sci-fi writers and publishers hadn't happened the way they thought - science had gone in different directions.
That's how the origin of the term came about, and the context in which Gibson was writing. But the actual advent of "Retro-Futurism" is sort of a perennial concept in science fiction. From the very beginning there has been an aspect of bringing social conventions of the past to "futuristic" technologies and settings, and marked by such weirdness as Star Trek episode "Bread and Circuses" (1968) where a Roman Empire has 20th century technology - or the inverse, such as Mark Twain's A Connecticut Yankee in King Arthur's Court (1889) or L. Sprague de Camp's "Lest Darkness Fal" (1939), where an ancient civilization is introduced and transformed but still recognizable due to comparatively advanced technology & social ideas.
More generally, however, people think of Retro-Futurism in terms of fiction with technology and styles which wasn't out of date at the time it was created, but which later succumbed to lag because real-world technology overtook the projected advancements, or more generally where the aesthetics of the future became comparatively quaint and impractical. The latter can be seen in Star Trek: the Motion Picture, where the uniforms they wear look impressively futuristic - but could not be gotten into and out of without assistance quickly, a major problem if you needed a bathroom break! As Gibson put it:
The Thirties had seen the first generation of American industrial designers; until the Thirties, all pencil sharpeners had looked like pencil sharpeners--your basic Victorian mechanism, perhaps with a curlicue of decorative trim. After the advent of the designers, some pencil sharpeners looked as though they'd been put together in wind tunnels. For the most part, the change was only skin-deep; under the streamlined chrome shell, you'd find the same Victorian mechanism. Which made a certain kind of sense, because the most successful American designers had been recruited from the ranks of Broadway theater designers. It was all a stage set, a series of elaborate props for playing at living in the future.
The last line is sometimes taken literally, as when aspects of these slightly-outmoded futures make the leap into everyday lives, such as Klingon-themed weddings or jackets with Tron-styled glowing lines to mimic the aesthetic of the film. Contemporary efforts often make metafictional reference to this aesthetic and its deliberate weirdness, such as in the film Machete Kills (2013) where the space-obsessed villain played by Mel Gibson asks his followers to reveal their "true selves" - and they were shiny-cloth costumes that wouldn't be out of place in a 1950s sci-fi B-movie.