When I heard, a couple of years ago, that the director James Gray was working on a movie set in outer space, I was worried. Gray is a filmmaker whose work conveys a powerful sense of place; for him to be filming in a dark void or a closed capsule struck me as an obstacle at best and a recipe for disaster at worst. I should have had more confidence in the judgment and inclinations of a filmmaker as original as he is—and, especially, a filmmaker whose ideas about the art of cinema are inseparable from his relentless self-questioning. In “Ad Astra,” which opens on Friday, Gray travels far afield to reach far within himself; the movie is something like his own refraction of a Terrence Malick film, a conjuring of deep subjectivity in deep space. In some essential ways, Gray, escaping from the confines of familiar earthbound realism, goes aesthetically further than he has ever gone before.

A basic problem for filmmakers to overcome in space movies is the demand of exposition. The required world-building of a movie about hypothetical lives in the imaginary future would seem to work at cross purposes to Gray’s usual method, which is to take the recognizable and infuse it, from the start, with a personal and distinctive tone. It turns out, though, that “Ad Astra” stands the world-building on its head, with ingenious touches that render the strange familiar and the implausible obvious—only to then fracture those instant new commonplaces with psychological turmoil. The canniness of Gray’s procedure is matched by the boldness, even the recklessness, of the extremes to which he pushes it—along with his characters, his story, his emotions, and his techniques. The result is to turn “Ad Astra” into an instant classic of intimate cinema—one that requires massive machinery and complex methods to create a cinematic simplicity that, for all the greatness of his earlier films, had eluded him until now.

“Ad Astra,” which Gray co-wrote with Ethan Gross, is set in the late twenty-first century, at a time when travel to the moon, and even to Mars, is ordinary. A highly skillful and esteemed astronaut, Major Roy McBride (Brad Pitt), is tapped for a critical and unusual assignment: a series of “power surges” is threatening life on Earth, and they’re thought to be coming from near Neptune—the site of a mission from twenty-five years earlier, the Lima Project, which was headed by McBride’s father, Clifford (Tommy Lee Jones). Clifford was the most decorated astronaut of all, a pioneer on Jupiter and Saturn. But his mission has long been deemed lost and he is presumed to be dead; neither Roy nor anyone else has heard from him in sixteen years. Now the agency believes that the Lima vessel has survived, that Clifford is alive, and that he’s behind the release of antimatter (the vessel’s fuel) that’s causing the surge—so they recruit Roy to contact Clifford in the hope of getting him to stop. In order to send that message, Roy is dispatched to a base beneath the surface of Mars, the last undamaged site capable of sending signals to Neptune. When that effort fails, Roy decides to take matters into his own hands, becoming a stowaway on another mission to Neptune—a search-and-destroy mission targeting the Lima—in the hope of finding his father. Yet that mission quickly turns calamitous, and Roy finds himself making the long journey from Mars to the vicinity of Neptune all alone; that solitude, along with his inevitable encounter both with wreckage in distant space and (avoiding spoilers) with the version of his father that he finds there, is the core of the movie.

All space-travel movies are inevitably in dialogue with Stanley Kubrick’s “2001: A Space Odyssey.” Gray’s film is explicitly so, from the very start, with a nod to “2001” ’s famous Star Gate sequence, in which the astronaut Bowman gets caught in Jupiter’s gravitational field and is subject to body-shaking, mind-bending, time-bending pressures. At the start of “Ad Astra,” Gray offers an extended extreme closeup of Roy being subjected to the jittery and distorting shake of a space mission, with eerily pure gleams of light on his helmet’s glassy mask—but without the hallucinatory visions. Right away, the movie plunges the viewer into the physical stresses and mental demands of space travel, its expansion and compression of the very nature of human experience—inner experience—and then, soon thereafter, anchors Roy in life at home.

As ever in Gray’s films, the drama of “Ad Astra” is a tale of generational conflict that repeats itself in the protagonist’s romantic and professional struggles, a story that distills personal backstory into a form of living, firsthand mythology. Roy remains emotionally scarred by his father’s absence, and, in the course of his quest for a desperate, possibly deadly reunion, the scars become all the clearer. The ferocity of Roy’s determination comes at the cost of an emotional life, an openness, a vulnerability that he has suppressed with great effort. He’s failing to connect with his wife (Liv Tyler). He literally can’t stand to be touched by his colleagues. But the preternatural calm that he displays, an essentially superhuman quality (its medical correlate is a heart rate that, despite any stresses, never rises above eighty), isn’t so much a willed coldness as a tensely contained heat, a fire driven far within to become a source of power.

As in a Malick movie, Roy’s voice, echoing in his own mind, is on the soundtrack, his inner life rendered in an internal monologue that haunts the movie from start to finish. That voice is both dramatic and poetic, informational and expressive, collecting shards of observations and reminiscences, pushing unrelieved tensions to the fore and turning his story into a crisis of consciousness. The continuities in Gray’s work are, above all, ones of mood and tone; in a sense, his very subject is the fictitious unity of character and of appearances. I’ve always considered him to be a brilliant depictor of practicalities yet a faux realist, whose depictions nearly shatter under the strain of the emotional world that they contain—an emotional world that thrums like a mighty undercurrent beneath the often still surfaces of his images.

Those practicalities get especially glorious treatment in “Ad Astra.” Gray conjures the future in grandly imaginative touches that link it giddily to the present day while signalling its alienating strangeness. As travel to the moon and to Mars have become common practices, they’ve become infected with the oppressive trivializations of train stations and airports—a Subway franchise, a Hudson News kiosk, and a host of bureaucratic annoyances and intrusions. (Natasha Lyonne does a brief and brilliant turn as one of those bureaucrats.) Spaceships have all the charm of airplanes, complete with overpriced and doled-out extras. Yet this banalization of space travel also has a bigger and grimmer set of consequences: the moon has become a political battleground, a literal war zone with undefined borders, menacing marauders, and international conflicts that makes one officer describe it as the Wild West—a flip term hinting at a deadly battle that Roy will have to face there in order to pursue his mission. (There’s some notable political world-building, too, in Roy’s mention of the Arctic as a war zone and his passing lament that yet another war over natural resources seems to be brewing.)