The next stage

For nine years Gillian Anderson played special agent Dana Scully in the X-Files. Now she is putting all that behind her by taking to the stage at the Royal Court - and playing another character called Dana

From the second storey corner room in the National Theatre Studio in which I am due to interview Gillian Anderson I can see her being conducted by the Royal Court's publicist past the front of the Old Vic theatre toward a door directly below me, although if I hadn't recognised the publicist, I wouldn't have recognised the actor. She's small - 5ft 3in exactly, according to one fan website - and carries her shoulders forward in a typical, defensive commuter posture. She looks a little weary after a long day rehearsing her upcoming play, and a bit miserable, like she might be on her way to the dentist. In short, she looks like everybody else in the street.

By the time she gets up the stairs she is wearing a braver face. Up close, her translucent, headlamp gaze has an unsettling intensity which is modulated by a warm, sweet smile - or not, as she chooses. She is fine with the room, although she is unhappy with the overgenerous fluorescent lighting. There is only one switch, on or off; she chooses off, which suffuses the room with a bruised sunset glow. Much better. She sits down. I ask her what the new play is about.

"Let me get my mind straight; it's been a long day," she says, putting her hands in her hair. "Um. What is the play about? The play takes a look at how we as human beings use various defence mechanisms to deal with pain and fear, and the effect that those coping mechanisms have on other people." She is an extraordinarily conscientious speaker, composing with deliberate care. The words come out at about typing speed. "The character that I play, Dana, attempts suicide ... "

Not too many actresses will play two Danas in a lifetime. It must be a little awkward, given the legacy of the X-Files, the sci-fi series in which Anderson played the icy agent Dana Scully from 1993 to 2002. The cold fusion chemistry between Anderson and her co-star David Duchovny (coupled with rumours of on-set enmity) attracted an audience far wider than its initial cult following, even when it made the Incredible Hulk look a model of scientific rigour by comparison. A recently repeated episode featured a man whose shadow was comprised of anti-matter and vaporised those it fell on. So, two Danas.

"I know," she says. "We've had that conversation about whether it would get in our way, whether audience members might chuckle or something when they hear it, and decided we were just gonna wing it." Anderson has proved her range as an actress, notably in Terence Davies' 2000 adaptation of Edith Wharton's The House of Mirth, but agent Scully, it seems, still casts a long, potentially destructive shadow.

Her new play, The Sweetest Swing in Baseball, by Chicago playwright Rebecca Gilman, charts the mental breakdown of a successful painter and her subsequent stay in a mental hospital. The title refers to the batting prowess of New York Mets star Darryl Strawberry, whose ongoing battle with drugs and alcohol lent his career a Shakespearean trajectory, and who features in the play at one point. While the other actors take two roles apiece, Anderson's Dana is on stage the entire time. "It's exhausting," she says. "But good exhausting. I'm ... you know, it's my decision. It's not like anybody made me do this."

Anderson has, of course, done theatre in London before; last year she appeared in What The Night is For alongside British actor Roger Allam. The reviews were not so much mixed as starkly polarised: some critics were impressed by the depth of her performance, others were scathing and dismissive. The Guardian's Michael Billington later wrote that she was unfairly vilified for having been an American TV star. In fact she had done a fair bit of theatre in America before a nine-season, 201-episode stint in The X-Files interrupted. "What I used to say, before I got on a television show, was that I wasn't interested in television, only in doing film and theatre," she recalls.

The career-defining decade in the X-Files almost didn't come about. The network executives didn't want her as Scully; they felt she wasn't conventionally sexy enough. And it almost ended abruptly: Anderson became pregnant in the first season, when recasting the role might have been the most sensible option. But they filmed round her pregnancy, and she was back on set 10 days after giving birth to her daughter Piper, now nine. In the meantime, she got married to Piper's father, Clyde Kotz, who was a set designer on the show. A year later they divorced. At the time, 18-hour days and weekends filled with promotional work seemed perfectly normal to her. "When I used to do interviews I would say, I did the show, the first year I got pregnant, I got married, I got divorced, I had a baby, and all that kind of stuff, and they'd say, 'You've had a really whirlwind life,' and I didn't know what they meant," she says. "And I look back and think, fucking hell, you had a whirlwind life!"

Anderson was born in Chicago in 1965, but soon after her family moved to Puerto Rico and then, when she was two, to London, so her father could enrol at film school. She lived in the capital for nine years before being transplanted to Michigan at the age of 11. By then, Anderson had a north London accent so thick than no one could understand her. In the end she made a conscious effort to change it, though even today she has an accent which might be described as fluid: more or less British at the start of our conversation, wholly American by the end.

By her own account, she had a troubled and rebellious adolescence, taking in a nose ring, a certain amount of alcohol and drugs, a little light shoplifting, a much older boyfriend and a prom night spent in the slammer. What she says now is, "I felt, as all kids feel at certain points in their growth spurts, misunderstood," and that "a lot more has been made out of it than what it was," but in past interviews she has hinted that it was a rather darker period than might be encompassed by ordinary teenage angst.

After she left home she continued the peripatetic lifestyle, moving regularly. These days she lives in London with her fiance, Kenyan-born journalist Julian Ozanne, but she also has homes in Vancouver - where the X-Files was shot and where her daughter now goes to school and lives with her father - and Los Angeles. "I still spend a good deal of time in both the other places as well," she says, "but I've made a conscious effort to make this a home base."

She took a break from acting in 2003, during which time she got deeply involved with several African Aids charities, and promptly found herself back in the limelight, making speeches at conferences and doing press to raise awareness. "Even though I'd been peripherally involved in Aids-related things, I'd never really taken a stand or done something that was revealing or public, and this kind of thrust me into speaking a bit more about it." She's still a reluctant spokesperson, she says, still worried about her naivety, but it is clear she knows what she is talking about.

The atmosphere in the room has by now got distinctly crepuscular. Anderson has been reduced to an outline. Occasionally she turns sideways and her magnificent profile, used to great effect in The House Of Mirth, is silhouetted against the windows. I can't see my notepad any more but she seems happy enough and chatters enthusiastically about the play, about the rehearsal process, about Darryl Strawberry.

"One game the crowd would be roaring his name, he's the best in the world. And the next game, if there had been any press about the fact that he was drinking ... they would scream at him and taunt him and throw things at him. Could you imagine that?" Does she think that she has had a pretty narrow escape from that sort of intense fame? "Yeah! It helps to move countries I think," she says. "There were times when it was definitely intense, but not intense like Madonna-can't-walk-out-of-her-front-door intense, which is, by the grace the God, not my experience."

Would it be right to say that she never enjoyed any aspect of being a celebrity? "I think that's pretty fair to say." It was not the pressure from fans she hated - she is rarely recognised - but the obligatory promotion, the endless press junkets, the repetitive, bumbling intrusion. She has, she thinks, probably even said she would never do another film if it means doing another press junket. "It feels so masturbatory, and it feels so fake, and I just don't understand why it has to be, why when someone is promoting a film they have to go and do four solid days, nine hours a day," she says. "The fact that you have to be raped in the process, have to be violated, ad nauseum ... " She puts her head in hands and sighs deeply. "Now I'm sounding sooo negative."

The tabloids had her as good as married last September, but the wedding in Kenya never took place, allegedly because of fears of terrorism. "I haven't actually decided whether I wanted to talk about this or not," she says, looking away. I think she's looking away. A long, long pause. "I guess maybe if I answered it the press would stop calling the home number, which is what they've been doing lately." It was, she says, nothing sinister, simply that their plans for a big wedding in the African bush became a logistical nightmare. "At one point it became just too fucking much, we were trying to do too much, and so we called it off. And then we moved in together and that's taken a while, and we just haven't got round to replanning. The thought of actually going through it again still feels very fresh." There's a kind of uncontrollable honesty in her which makes you understand why, given the opportunity, she'd rather be reticent.

It's only when I take her up the stairs to where the photographer has set up that I notice her hair isn't red anymore, but dyed a dirty blonde, with black roots. She poses obligingly, patiently, and when it's over she pulls on her coat and bids everyone goodbye. "You're a star," says the publicist.

"You're not allowed to say that to me," she snaps, jokingly, but in a tone that makes me glad it wasn't me that said it.

· The Sweetest Swing in Baseball is on at The Royal Court from March 25 until May 15.