Ruth Gordon, 88, an actress whose career spanned seven decades and included roles in silent movies, starring turns on the London and Broadway stages, and memorable parts in modern films and on television that made her quite nearly a cult personality, died of a stroke yesterday at her summer home on Martha's Vineyard.

She was excellent in any medium. Whether dancing in silent movies, wowing audiences on the London stage in the 1930s, or interpreting such difficult roles as Nora, in Ibsen's "A Doll's House" or as Natasha in Chekov's "The Three Sisters," on Broadway in the 1940s, she received raves.

Traveling to Hollywood in 1940, she starred as Mary Todd in "Abe Lincoln in Illinois," where some critics felt she stole the show, and as Mrs. Erlich in "Dr. Erlich's Magic Bullet." She costarred with Greta Garbo in "Two-Faced Woman," and also appeared in "Edge of Darkness," "Whatever Happened to Aunt Alice?" and "The Country Wife."

Miss Gordon's most memorable film roles in recent years included "Where's Poppa?" and "Inside Daisy Clover," for which she won a Golden Globe Award in 1966. She played a devil-worshiper in the 1968 production, "Rosemary's Baby," and won the Academy Award for best supporting actress. She played the feisty and acidic, shotgun-wielding mother of Clint Eastwood in "Every Which Way But Loose" and "Any Which Way You Can."

"Harold and Maude," in which she played an 80-year-old woman having an affair with a suicidal 19-year-old boy, bombed at the box office shortly after its 1971 release. Yet, it achieved an enormous following among college students, and 12 years after its release, finally made a profit.

Miss Gordon said that when her $50,000 check for the movie arrived in the mail in 1983, she almost threw it away. "I thought it was one of those sweepstakes from Reader's Digest," she said.

She was a pixie rogue with an adventurous air, amd a tiny lilt to her voice. Over the years, she transformed herself from an ingenue to a leading lady of the American stage, to an angry old woman with rather strange causes in recent and memorable films. She gained expertise treading not only the Broadway but the nation's stages and endured to become a character encountered in the age of television videos. Her business colleagues ranged from Louis B. Mayer to Roman Polanski, and she acted with leading men from Humphrey Bogart to Clint Eastwood.

In addition to acting, her contributions to the arts included novels, autobiographical works and screenplays. She and her husband of 43 years, writer and producer Garson Kanin, cowrote two screenplays, "Pat and Mike" and "Adam's Rib," both of which became classic vehicles for costars Spencer Tracy and Katharine Hepburn.

Her life was as panoramic as her career. She bandied wits with the masters who refreshed themselves at the "round table" at New York's Algonquin Hotel in the 1920s, and those who held forth on "Saturday Night Live" and "SCTV" in the 1970s and 1980s.

She won an Emmy in 1979 for a guest appearance on "Taxi," and has been nominated for an award this year for her work in the television movie "The Secret World of the Very Young." She is featured in a movie, "Maxie," that is to be released this fall. In 1982, she published a novel, "Shady Lady," about a sexy Midwest flapper who becomes a Ziegfeld Girl.

She was not only loath to retire but proclaimed the fact. In 1977, she testified before the House Select Committee on Aging, saying, "It's like slavery. First you're allowed to work. Then you're not. As the great baseball player Satchel Paige once said, 'How old would you be if you didn't know how old you were?'"

Miss Gordon was born in Quincy, Mass. Her father was a shop foreman and retired sea captain. Her mother bartered sewing for the young daughter's piano lessons and accompanied her to Boston stage entrances, where she sought jobs. Finally, Miss Gordon broke the news to her father that she wanted to travel to New York and become an actress.

His less-than-ecstatic reaction to these tidings, according to Miss Gordon, was to ask " 'What makes you think you've got the stuff?' " She said that her father had hoped she would become a physical education teacher but "I wanted to do something a little more sexy than that."

In 1914, with $50 pinned to her corset, Miss Gordon arrived in New York to enter the American Academy of Dramatic Arts and, she hoped, to become a star. She fell in love with the city and considered herself a New Yorker for ever after.

"We're tough, and I can't tell ya how I admire people who are tough. People go, they dodge the cars, brakes screech, the taxi drivers yell. It's a challenge. You don't relax. You don't sit back, and you don't take it easy. That's New York and I love it," she once told an interviewer.

If Miss Gordon loved New York and loved acting, it took time for that love to be returned. Her instructors suggested she did not really have the abilty to become accomplished, let alone exceptional. Indeed, critics continued to spot rough spots in her work and she continued to work on her technique for years.

But she persevered. "The will to succeed, that is half the battle. I hadn't any illusions about my ability; I only thought if other people could learn to act, I could," she explained.

Her acting was first critically noticed in 1915, when she played Nibs in a Maude Adams' Christmas revival of "Peter Pan." About this time she also played taxi dancer in Irene and Vernon Castle's first film, earning $1.25 a day and two ham sandwiches.

She was playing the "baby-talk girl" in Booth Tarkington's "Seventeen" when she met her first husband, Gregory Kelly. She said that he taught her to act. The two often appeared together on the stage in a stock company they owned in Indiana. He received the better reviews. The marriage, which took place in 1918, ended with his death in 1927.

It was in the 1930s that Ruth Gordon emerged into the front ranks. Her roles ranged from what some critics called the "delicious moron" she had played in the 1920s, to sweetly poisonous characters and shrewd historical figures.

She first appeared on the London stage, at the Old Vic, in October 1936 as Mrs. Pinchwife in "The Country Wife," a 17th century bawdy classic. Few British critics thought an American could pull it off, but the production broke box-office records and later ran in New York. By the 1940s, critics were comparing her to Helen Hayes, one critic writing that while Miss Hayes was the deeper actress, Miss Gordon was the wittier.

She is survived by her husband.