THE CHARACTER of Gwen Landis in "Fifth of July" is one of those unique wackos who can be a milestone in an actress' career. She's a sexy heiress and would-be singer who says she's taken so many drugs her brains are fried. She's a woman molded by the '60s, when she was swept up in the counterculture and protest movements with such enthusiasm that she even firebombed her own company.

("One cocktail in the doorway of the building broke about six windows," she says. ". . . Oh please, I was stoned.")

Swoosie Kurtz won a Tony for her interpretation of Gwen on Broadway, and local actress Rosemary Walsh has earned her share of plaudits for her performance in the Studio Theatre's production here. (It plays, despite an unairconditioned theater, through next Sunday.) Walsh has been able to capture Gwen's vulnerability as well as her zaniness, a delicate portrait of an indelicate woman.

Although she drew on memories of people she knew in the '60s for Gwen, Walsh's profile could hardly be less similar. While Gwen was taking taxis to demonstrations and learning to be a hippie, Walsh was first a uniformed Catholic school girl at Ursuline Academy in Bethesda and then a student at George Washington University. Within two years of graduating with a B.A. in English literature in 1969, she was a young mother with a husband in graduate school.

By that time she had made a choice that would affect the basic course of her career: family first, acting second. Instead of going to New York and pounding the pavement, she went with her husband to South America and Texas, where he was on assignment for Project Hope. When she was a finalist in the Theater Communications Group national auditions in 1979, she was offered jobs in theaters in several other cities. She turned them down to make her way as best she could in Washington.

"I'm local," she said. "I'm going to stay local. I have a family, I have a garden. I even like to weed."

So far her acting career falls into the good-parts-for-no-pay category: readings at New Playwrights, an understudy job at Arena, a year with Pro Femina, two plays at the Source. For five hours a day she teaches acting at the Duke Ellington School of the Arts, a job she has found immensely satisfying.

Some of her students have come to see her in "Fifth of July" and been surprised to see their strict and formal Mrs. Walsh using language that even a street kid might find blue. "There I am, prancing around in a sheet, snorting coke, sitting in people's laps--they can't believe Teacher is kissing people, and they can't believe the language."

Of course, such transformations are the fundamentals of an actor's craft, and she hopes her students learn something from seeing her work. Gwen is not the sort of part she normally has been cast in, and the way she happened to be cast was almost a fluke. She was supposed to meet a friend for lunch. The friend wanted to audition, and asked Walsh to meet her at the Studio. The friend never showed up, so Walsh picked up a script and fell in love with it. She tried out, and got the part.

"In a part like this it's easy to do a surface job," she said. "I get a lot of laughs. But she's a woman with a lot of levels. She has bad health, she's probably going to die, she's in love with a slime, she cares about all the other people in the play--she's not just a wacky person."

One of Gwen's best speeches comes when she is trying to explain the radical '60s to 13-year-old Shirley, conjuring up an antiwar rally to a child who can't conceive of such goings-on:

". . . 500,000 people, speakers' platforms, signs thick as a convention, everybody's high, we're bombed, the place is mobbed, everybody's on the lawn with their shirts off, boys, girls; they're eating chicken and tacos, the signs say: End the War, Ban the Bomb, Black Power, and Gay Power, and Women's Lib; the Nazi Party's there, the unions, demanding jobs, they got Chicano Power and Free the POWS, and Free the Migrants, Allen Ginsberg is chanting Ommm over the loudspeakers, Coretta King is there; how straight do you have to be to see that nothing is going to come from it? But don't knock your mother, 'cause she really believed that "Power to the People" song, and that hurts."