With the exhibition 'Hide/Seek: Difference and Desire in American Portraiture,' one of our federally funded museums, the National Portrait Gallery, here in the city of don't-ask-don't-tell, has gone where our big private museums apparently dare not tread, deep into the history of art by and about gay artists. Over the past few years there has been plenty of speculation as to how this show would shape up, and when a copy of the catalog arrived, I felt a bit let down. All the artists were well known -- stars -- as was most of the work. The whole enterprise looked like an exercise in Hall of Fame-building, rather than like an effort to chip away at the very idea of hierarchy and exclusion. We were getting a 'pride' display, an old model, very multicultural 1980s. Then, when the Catholic League and several members of Congress demanded the removal of a piece -- a video by David Wojnarowicz (pronounced voy-nah-ROH-vitch) that included an image of ants crawling on a crucifix -- and the gallery, which is part of the Smithsonian, said OK, we really were in the 1980s, back in the culture wars. Which led me to understand the show in a somewhat different way. On reconsideration, it seems more purposeful, as if specifically designed to avoid any controversy that might distract from the major point it was trying to make: namely, that work of gay artists was fundamental to the invention of American modernism. Or, put another way, difference had created the mainstream. But how was the presence of difference defined in art? By subject matter? By style? By the sexual orientation of the artist? And isn't gayness, the most familiar form of such difference, a period concept, inapplicable to life and art of a century ago? Today the very word is used for convenience rather than categorically, with queer often preferred. (One way to think of it: gay is something you are; queer is something you choose to be outside of the heterosexual norm.) Clearly the exhibition covers a lot of ground and raises many questions. It also has wonderful art, and the art stays wonderful whether you ask the questions or not. Again this seems part of the plan devised by the curators, David. C. Ward, a historian at the National Portrait Gallery, and Jonathan D. Katz, director of the doctoral program in visual studies at the State University of New York at Buffalo. They have assembled a historical show with a very specific slant, but with rewards for everyone. The history begins at the end of the 19th century, where two generations of difference meet in an 1892 photograph of the elderly Walt Whitman taken by the middle-aged Thomas Eakins. In his poetry, Whitman wrote of sexual attraction to men and women alike, but he lived with a man, Peter Doyle. (A Whitman exhibition at the National Portrait Gallery a few years ago acknowledged their relationship.) Eakins was a married man, but the homoeroticism in his painting could be as bold as in Whitman's poetry. The great 1898 picture 'Salutat,' the first work you see, right at the entrance, ostensibly depicts a boxing match. But there's no fight, just a young, near-nude athlete who raises one arm high over his head as if to reveal his body more completely to his avid all-male audience. Some of Eakins' contemporaries -- John Singer Sargent, the Boston photographer F. Holland Day -- were more forthright in art about their attraction to men. Certain other homosexual artists, like Marsden Hartley, at least early on, referred to their same-sex desires in a coded abstraction. Then there were heterosexual artists who occasionally depicted homosexual themes. In a 1917 print by George Bellows, 'The Shower-Bath,' a stocky older man is pretty clearly propositioning a younger one in a bathhouse. As the catalog explains, the identities defined in such encounters at the time were explicit: the effeminate, passive partner was the homosexual, the active, soliciting one was, or could pass for, a straight guy out for a good time. What seems surprising is that the print, which today would have a niche appeal, was a popular hit, widely circulated. Apparently the average viewer saw the vignette as just one more entertaining fact of city life. Cities can be good that way; they overlook and accept. A photographic double portrait of the choreographer Antony Tudor and the dancer Hugh Laing, taken in 1940 by Carl Van Vechten, is a real city picture. The two men, who were a couple, sit close together. If you want to -- but you don't have to -- you can see that they're holding hands. That's what this urbane image is about. Certain portraits done outside a city setting use other means to signal same-sex affections. One of the surprises is a 1930 painting by the regional artist Grant Wood of his 21-year-old assistant, Arnold Pyle, who he depicts, with melting tenderness, against an autumnal rural landscape empty except for the figures of two male bathers. And there's Andrew Wyeth's 1979 portrait of his country neighbor Eric Standard. The young man stands nude in a wheat field, his body, right down to a tan line, detailed with the kind of air-brushed eroticism associated with Playgirl centerfolds. The show is short on women, but those present are formidable. Gertrude Stein and Alice B. Toklas are here, of course. So is the writer Janet Flanner and the future art dealer Betty Parsons in photographs by Berenice Abbott. Both traveled in the same tightly knit lesbian circles in pre-World War II Paris; Parsons would be instrumental in getting Abstract Expressionism off the ground in New York. Sexual difference can sometimes require protective disguises, though not for anyone here. Flanner has two party masks fancifully attached to her top hat in Abbott's picture, but her gaze is open and confident. In a painted portrait by Romaine Brooks, the sculptor Una, Lady Troubridge, treats clothing as a form of costuming: she's dressed as an English gentleman, right down to the monocle. The long-haired woman in a 1947 painting by Agnes Martin wears nothing at all. Martin tried to find and destroy all her early figurative work, but this picture -- a self-portrait? -- escaped the purge. As art, it's no great shakes, but in some essential way it brings her out of hiding, out of the aura of hermeticism she built around herself, and makes her real. What is great is the sight of work by one of American modernism's most influential power couples, Robert Rauschenberg and Jasper Johns. Both men maintained a long silence about their lives together as partners in the 1950s and '60s. But here they are, side by side, each represented by work from that time incorporating photographic self-portraits. Rauschenberg died in 2008. That Johns agreed to have work here is a quiet confirmation of the growing cultural willingness to acknowledge gay identity. In part, AIDS is responsible for that. It yanked everybody awake, pushed gayness and queerness out of a subcultural closet and fully into the public realm. 'Hide/Seek' stands as evidence that they have stayed there. And, despite the inclusion of some recent work, the show really ends with AIDS-era art: an unfinished Keith Haring painting, a Felix Gonzalez-Torres candy spill, and Jerome Caja's portrait of a friend painted with a mixture of nail polish and cremation ashes. The Wojnarowicz video, 'A Fire in My Belly,' belonged in this group. It was made in the late 1980s in response to a lover's death and after the discovery of the artist's own HIV. And crucial elements missing from much of the exhibition -- personal and political anger, formal rawness, overt spirituality -- are embodied in that work. In a sense the video was missing even when it was here: it was edited down for the occasion to barely 4 minutes from 20. But to have removed it entirely because of ideological strong-arming was to violate the premise and the promise of the show: difference was sent back into hiding. It is way past time for mainstream art history to acknowledge the shaping role of sexual difference in modern art. And 'Hide/Seek,' with its many strengths, begins to do so in a persuasively accessible way. Equally important is the need to assess the price that acceptance into history, and into the world, on mainstream terms may exact. Wojnarowicz believed, as have many artists, that outsider position is a valuable one, and with difference comes responsibilities, resistance to acceptance-at-any-cost being one. The absence of a sense of that resistance in the show is what disappointed me when I first saw the catalog. It deepened with the removal of the video. And it stays with me still. 