Space travel, in the popular imagination, has always been depicted as something mystically removed from life on earth — a realm of gliding majesty, free of the friction that weighs us all down. But in “First Man,” Damien Chazelle’s turbulently spectacular and enthralling drama about Neil Armstrong and his journey through the space program of the 1960s, there’s nothing tranquil or reassuring about riding in a dirty cramped rocket ship surrounded by buttons and dials. It’s closer to being trapped in some purgatory of explosive dread.

When Armstrong (Ryan Gosling), his body wedged into the claustrophobic compartment of a Gemini space capsule, takes off, the craft he’s on shakes so violently it feels like it’s going to burst apart. It’s not just that the ride is more rough-and-tumble, and more starkly terrifying, than anything we’ve seen in a drama of space flight before. It’s that the jittery energy on display is essentially industrial. Armstrong has been strapped into a machine that’s built to tear a hole in the fabric of what’s possible. That’s why the thrust of the ride is so violent. The capsule shakes because it’s a force of entropy. It stands for the world as we know it coming apart.

Chazelle knows that the story of the NASA space program has been told before (quite memorably, in its way, in “The Right Stuff”). So his audacious strategy is to make a movie so revelatory in its realism, so gritty in its physicality, that it becomes a drama of hellbent danger and obsession. “First Man,” which is Chazelle’s first feature since “La La Land,” is a docudrama in the most authentic and exciting sense of the word. Chazelle restricts the action almost entirely to the point-of-view of the astronauts themselves: the things they literally see and hear during their missions (the movie eschews panoramic shots they aren’t privy to), along with what they’re thinking and feeling.

From the dizzy and volatile opening sequence, in which Armstrong, as a test pilot in 1961, rides an X-15 up into the black clouds, ripping through the air to the point that he almost can’t get back (mission control: “Neil, you’re bouncing off the atmosphere”), the movie is tethered to everything that he experiences: the random shards of sky looming up out of cramped windows, the topsy-turvy angles, the whole existential inside-the-cockpit zooming-into-the-void craziness of it all. Propelled by Linus Sandgren’s raw-light cinematography and Tom Cross’s hypnotic editing, “First Man” is so immersive in its glitchy, hurtling, melting-metal authenticity that it makes a space drama like “Apollo 13” look like a puppet show.

The fact that space travel, viewed from the inside, could look and feel so much more abrasive and hazardous than we might ever have thought is part of the raw power of “First Man.” Yet what finally gets to you about the movie, and makes it a haunting experience, is that the quivery peril of being aboard a rocket ship incarnates something indelible about what the space program was about: not just a “new frontier,” but a culture’s way of defying death. The movie captures that death was always part of it. The steep risk factor, the sheer number of pilots and astronauts who lost their lives, the scary macabre thrust of the voyages — it was all a dream poised on the edge of an abyss. “First Man” bears the same relation to the space dramas that have come before it that “Saving Private Ryan” did to previous war films. The movie redefines what space travel is, the way it lives inside our imaginations, by capturing what the stakes really were.

Armstrong, as Gosling plays him, is a stoic but inwardly troubled figure who becomes a tersely triumphant warrior in orbit. NASA needs pilots with a background in engineering, and Armstrong is a superior engineer, which at times provea instrumental to his survival in space. “First Man” demonstrates that the astronauts, in case anyone doubted it, were much more than “Spam in a can.” They truly had to pilot. The movie follows Armstrong from the dawn of the ’60s, when he and his wife, Jan (Claire Foy), are desperately fighting to save their little daughter from succumbing to cancer. They lose the battle, leaving them with their son (before long, they have another boy), but the death of that child shadows Armstrong. It’s a reminder that loss is built into what he’s doing.

In “First Man,” Chazelle orchestrates a highly original mood of adventure drenched in anxiety. The script, by Josh Singer (“The Post,” Spotlight”), doesn’t waste time on standard biopic scenes — like, for instance, dramatizing the backroom politics of which astronaut gets chosen for which mission. The film’s attitude, which mirrors Armstrong’s vantage as a loyal U.S. space soldier, is that whatever happens happens. The techno-chatter from Houston, always crackling through the capsule radio (“We have your ground TPI backup when you’re ready to copy”), is part of the movie’s excitement, its you-are-there quality.

Once Neil and his family arrive in Houston, where they move into a tract-home neighborhood along with several of the other astronauts’ families, Chazelle depicts Armstrong and his buddies in quick, fleet, finely staged scenes that nail the essence of their camaraderie — a kind of leftover-’50s straight-arrow bond that’s always hovering around the unspoken fact that they’re rivals as well as pals, and that any one of them might end up a goner. The actors make vivid impressions, from Patrick Fugit as the warm and trusting Elliot See to Jason Clarke, who plays Ed White as the sharpest and most convivial of Neil’s buddies, to Corey Stoll as the tell-it-like-it-is Buzz Aldrin, who’s so spiky and blunt about his ambition that no one can stand him.

Gosling gives a tricky, compelling performance that grows on you. He plays Armstrong as a brainy go-getter who has learned to hold what he feels inside (Neil, we learn, wrote musicals in college, and is now ashamed of it). Yet he lets out just enough emotion, especially when someone crosses him, to exude a quiet command. Shortly after he’s chosen to be a Gemini astronaut, Armstrong is strapped into a spherical training simulator that looks like a cross between a carnival ride and a medieval torture device. It turns you every which way at once, which results in each astronaut passing out, then running into the bathroom to throw up. But by the time Armstrong gets to ride a rocket in Gemini 8, the simulation turns real: His mission is to dock his capsule to an adjacent rocket, which happens without a hitch, but then everything goes haywire. The capsule starts “rolling left” (i.e., spinning out of the control). Gosling makes Armstrong a figure of intensely contained can-do moxie whose ability to guide a ship, especially when it’s at death’s door, is the essence of grace under pressure.

As the space program comes into focus, with the explicit Cold War goal of landing a man on the moon by the end of the decade, Neil rises in the ranks, going places no human has before, yet at every turn the journey is marked by the comrades he loses. Each new flight marks an attempt to do something beyond what the previous flight accomplished, so each contains a new seed of hazard. The missions are about the NASA engineers testing out their ships’ ability to orbit, then to dock, then to release smaller ships into space (the strategy that will produce the Eagle module that lands on the lunar surface). That means that every flight, from the first Gemini mission to the Apollo moon landing, is literally unprecedented. Everything is planned out, but on some level the missions are all acts of conjecture; each flight is winging it. That’s why there are huge mistakes, and huge tragedies (like the moment Ed White and two other astronauts burn to death in the cockpit during preflight testing for the first manned Apollo mission).

It’s no wonder that Armstrong’s wife is a nervous wreck. Claire Foy plays Jan as someone who just wants a “normal” life but is leading it behind a mask of frozen woe. As the film goes on, Foy’s performance grows in antsy, chain-smoking force, and we realize that Jan’s burden isn’t only her fear. It’s that it’s her job to feel all the emotions her husband buries. She knows how much NASA is making this up as it goes along (“You’re a bunch of guys making models out of balsa wood! You don’t have anything under control!”). Armstrong and his astronaut cronies may be famous, but they’re a million miles from the public, from the reporters who pester them at press conferences, from the Congressional leaders who are tired of funding them. They’re in their own private bunker of frayed-nerve space dreams.

Throughout the film, Chazelle finds ways to come at his subject from unconventional and even playful angles. At one point, he throws in the Gil Scott-Heron poem “Whitey On the Moon,” to capture the degree to which not everyone in the late ’60s was on board with the space program. As for the lunar landing itself, that cosmic pageant finds its drama in the ironic matter-of-factness with which Chazelle stages it. Here’s one event that’s already fixed, in our mind’s eye, as the greatest sci-fi movie reality ever made, so “First Man” plays it neutral and deadpan, showing us the moon through the capsule window as a death zone of luminous rubble, then reveling in the texture of the powdery surface, the spooky remoteness of Armstrong gazing down at his boot as he takes that first step. It’s a staggering victory with a hidden hint of the surreal, maybe even the insane. It makes Neil Armstrong an American hero, but he needs to get back to reality.

“First Man” isn’t merely timed for awards season. It’s set to lead into the 50th anniversary of Armstrong’s moon walk, and for moviegoers it should prove a cathartic experience to revisit the spirit of what America once did, and what America once was. After seeing “First Man,” it’s doubtful that you’ll ever think about space flight, or Armstrong’s historic walk, in quite the same way. You’ll know more deeply how it happened, what it meant and what it was, and why its mystery, more than ever, still lingers.