"FIVE SURREALISTS from the Menil Collections," at the National Gallery of Art, is an exhibition unlike any ever seen in that museum.

The walls aren't white, they're smoke-smudged gray, the gray of caves or tombs. Its images confound--the astronomer is blind, the coffin lounges grandly on her pillows of hard bronze. It is disquieting, irrational, poetical, unlovely. Walter Hopps, the scholar who helped pick the objects in it--the paintings, prints and statues, the stairs that climb to nowhere, that folded metal glove--says he chose to make the walls so dark to suggest "another world."

Most modern European paintings hanging in the National Gallery celebrate the lovely. These instead subvert it.

The sweet and famous pictures bought by Chester Dale, Paul Mellon and Jock Whitney were painted to delight the cultivated eye. These disturb the mind.

All were purchased by Dominique de Menil and her late husband, John, whose new Texas museum, the Menil Collection, now under construction in Houston, is directed by Walter Hopps.

The five artists featured--Giorgio de Chirico from Italy, Germany's Max Ernst, Rene' Magritte from Belgium, Yves Tanguy from France and Romania's Victor Brauner--cared little for prettiness and even less for logic. They painted to reveal. By delving into dream, and forcing strange encounters between unrelated objects, they sought to make their art--in a phrase of Lautre'mont's, a poet they admired--as "beautiful as the chance encounter, on an operating table, of a sewing machine and an umbrella."

Their objects discombobulate, and do so with intention. Magritte's pipe is not a pipe, it says so on the canvas. It seems to be raining businessmen in bowlers in the painting he called "Golconde" (1953), but the viewer can't be sure. They may well be ascending like so many briefcase-bearing helium balloons. The figures that appear in the piazzas of de Chirico are something less than men, and something more than tailor's dummies. Loplop, the bird-being in so many of the paintings of Max Ernst, is--so Ernst insisted--both "the superior of the birds" and the artist's alter ego. The little mustached king in Victor Brauner's etching of 1949 wears no helm of grandeur: his crown is a hand that gives us the finger. The open, spacious landscapes painted by Tanguy show no land we know.

Surrealism's strangenesses have something real in them. They stab into the memory. They accept the familiar--the winds of German forests, the suburban streets of Belgium, the arcades of Ferrara, the folk songs of Romania, the glow of desert skies. None is pure abstraction. These once-astounding visions have become the common currency of album covers, TV ads and motel room art. Although inexplicable, none is inaccessible. The "other world" they summon parallels our own.

Surrealism's high priest, the poet Andre' Breton, wrote in 1936 that "everything leads to the belief that there exists a certain point of the mind at which life and death, the real and the imaginary, the past and the future, the communicable and the incommunicable, the high and the low are not perceived as contradictions. It would be vain to attribute to surrealism any other motives than the hope of determining this point."

No movement so dependent on slippage of the ra- tional can be defined precisely. Surrealism's roots, Hopps explains, twist into the past through the mind games of Marcel Duchamp, Man Ray and Picabia, Sigmund Freud's consulting rooms, the heady, violent nonsense of the Dadaists of Zurich, through the wild, carefree parties of bohemian Manhattan, the carnage of World War I and the secret cells of anarchists, deep into what he describes as "the febrile end of late 19th-century romanticism, the world that produced Munch."

The five artists here believed that they were fighting for world revolution. Most of them were communists, at least for a while. But something in their art is essentially conservative. It welcomes the remembered, embraces the old-fashioned. The objects of Magritte, a pipe, a key, a goblet--and a coffin on a chaise longue--recall the padded parlors of his childhood in Brussels and "Madame Re'camier," a painting he admired by Jacques Louis David.

The Surrealists agreed the dream-realm they'd discovered had been glimpsed before. They bought poetic objects, odd, anonymous antiques. A number of the oddest--a twisting model staircase whose stairs ascend to nowhere, a crumpled glove of painted bronze like those etched by Max Klinger in 1881--are included in this show. None is more surreal than "The Eye of the Beloved." A perfect eye-sized painting of a woman's eye--whose no one can say--gazes at the viewer from a hinged case lined with velvet. It is a gentleman's memento from 1844.

The works by these Surrealists, save for those of Ernst, are not modern in technique. Magritte, Tanguy and de Chirico used oils and small brushes as painters always had. Brauner drew his imagery from old Romanian folk art. While dreaming and imagining, all five of them looked back.

The objects of Magritte have a reportorial, not-at-all-fantastic, nearly banal look--and yet are deeply melancholic. So, too, was his childhood. He grew up in staid comfort in a bourgeois Belgian home, but his mother drowned herself when he was 13.

Ernst also explored memory. "Powerful childhood experiences--the death of his pet bird and a coincidental birth of a sister, the terror of and fascination with the deep forests around Cologne--fed his later imagery," writes Dawn Ades of London in the good brochure that accompanies this show. Tanguy's father, a ship captain, died when Yves was 7, and something in the paintings suggests a yearned-for voyage through deserts or calm seas.

The canted piazzas of de Chirico have the look of stage sets. The actors who perform there, the mannequins and T-squares, blackboards and hard biscuits, play memory rediscovered.

"Let me relate," he wrote, "how the revelation of a painting . . . entitled 'Enigma of an Autumn Afternoon' first came to me. One clear autumn afternoon I was sitting on a bench in the middle of the Piazza Santa Croce in Florence . . . I had barely recovered from a long and painful intestinal illness, and was in a state of almost morbid sensitivity. The whole world around me, including the marble of the buildings and fountains, seemed to me to be convalescing . . . Then I had the strange impression that I was looking at these things for the first time, and the composition of the painting revealed itself to my mind's eye. Now every time I look at this picture, I see that moment once again. Nevertheless the moment is an enigma for me, in that it is inexplicable. I also like to call the work derived from it an enigma."

The real and the unreal, the dreamed and the experienced, combine in all these works just as Breton thought they should. Psychiatrists seeking therapies and ecstatics seeking visions know, as Victor Brauner did, that in such strange conjunctions something magic blossoms.

Brauner thought himself in touch with surreal powers. Consider what transpired in 1938. Dawn Ades tells the story: "Intervening in a quarrel between two friends, Brauner was hit in the face with glass from a bottle thrown by one, and was blinded in one eye. Brauner seems to have had a strange premonition of this: Pierre Mabille, the first of several surrealists who examined the case, in 'L'oeil de peinture' 'The eye of the painter' (1939) , traced the theme of the displaced or damaged eye through a number of pictures, including the 1931 'Self-Portrait (with gouged eye),' to Brauner's unconscious obsession with the need for choice between the 'real' world the eye shows us and the world opened by the imagination and the dream. To suppress the eye is obviously an extreme solution, but Mabille rejected the hypothesis that the accident was pure coincidence. He noted that while before the accident Brauner had been timid, pessimistic and demoralized, afterward he was delivered, affirming his ideas with clarity and authority, working with a new vigor.' "

One sign of that vigor is a gilded Brauner bronze called "Signe" (1945), a piece in which twin heads appear. The eyes of one are open, those of the other closed.

Despite works good as this one, Brauner seems the least impressive artist here. Tanguy, a one-note painter (who, incidentally, chose to be an artist after glimpsing two de Chiricos from the platform of a Paris bus) is not much better. The forests of Max Ernst (for instance "Day and Night," 1941-42), the enigmas of de Chirico ("The Astronomer," 1915, and "Metaphysical Interior with Biscuits," 1916)--and especially the grand Magrittes--dominate the show.

Many of the paintings here--Ernst's "Loplop Presents Loplop," de Chirico's "Astronomer"--have painted paintings in them. The master of such mind games was Rene' Magritte.

"The art of painting," he insisted, "is an art of thinking."

His finest pictures here pivot round that point where the object and its image attack one another. "The Betrayal of Images" shows a famous painted epigram he frequently repeated. "This is not a pipe," it says. It is, of course, a picture. Magritte, with his pipe, has punched what Robert Hughes has called "the hole in the mirror of illusion."

Magritte's "This Is a Piece of Cheese" (1937), a glass dish through whose cover we see a little painting of a wedge of brie, plays with the same theme. His "The Eternal Evidence" (1930) is a life-size nude--or rather it is five small paintings of five parts of her, her face, her breasts, her crotch, her knees, her feet--placed one above another. The blue, cloud-dotted sky portrayed in "The Telescope" (1963) belongs--or does it really?--not to the space beyond, but to the window's panes of glass.

What we think we see, and what we think we know, are constantly at war in the philosophical, funny, oddly unforgettable paintings of Magritte.

"The Glass Key" (1959) is among the best Magrittes on view. It shows a giant rock--could it be a Stone Age axe?--floating over mountains.

But dreams aren't made of stone. Among the first Surrealists, in Paris in the '20s, there were a number who believed that true Surrealist painting could not in fact exist. Pictures, they contended, were too solid and too real. They preferred the unplanned gesture, the unseen play of chance, the "pure psychic automatism" of Breton's early definition in "The First Surrealist Manifesto" of 1924. Surrealism, at first, was a literary endeavor, dependent not on plastic arts but on the invisibility of words.

Two sorts of Surrealist painting eventually emerged, one tied to automatism, the other to "illusion." In the '40s and the '50s, Surrealist automatism--or that version of it borrowed by the "action painters" of the New York School--was thought to be more fruitful than Surrealist illusions of the sort seen in this show. But now, with artists once again painting dreams and mythic riddles, the objects on display begin to seem prophetic.

If the present exhibition--it will close Sept. 28--is any indication, the Menil Collection, now scheduled to open in 1985, will be a stunning place. Dominique de Menil, 75, is clearly a collector of intelligence and daring. And her resources are vast. Her father helped found Schlumberger, the oil-field service firm. Schlumberger was worth $16 billion at the end of 1981.

It is good this show is here. Surrealist collections in Washington's museums are poor or nonexistent. The National Gallery, for instance, as yet owns no Magrittes. This city's great collectors, from Duncan Phillips on, found Surrealist art disturbing or ridiculous or worse. "Paul Klee," Hopps suggests, "would not be in the Phillips if he had painted big. The monsters he painted are so small they seem harmless."

John Rewald, the historian who helped Jock Whitney buy the colorful French paintings now hanging at the National Gallery, speaks for many such collectors when he dismisses Magrette's pictures as "mere painted puns."

This Surrealist exhibition partially explains why Hopps is so admired here. Through his roaming mind, and his first-rate exhibitions--"Edward Kienholz" at the Washington Gallery of Modern Art, "Poetic Objects" at the WPA, and a dozen more--he almost singlehandedly has introduced this city to worlds as other-worldly as those revealed in this show.