With the appointment of Anne d'Harnoncourt as the next director of the Philadelphia Museum of Art, one of the art world's longest-running guessing games finally is over.

The question has never been whether Ms. d'Harnoncourt - the museum's curator of 20th-century art since 1972 - would someday be the director of an art museum, but merely when - and of which museum.

The official answer came Wednesday, when the museum announced an executive reorganization that placed d'Harnoncourt in the director's spot - responsible for artistic matters. Board president Robert Montgomery Scott was named the new salaried president and chief executive officer, responsible for fiscal and administrative affairs.

When the director's job was open three years ago, Ms. d'Harnoncourt removed herself from consideration, and she also reportedly declined an offer about the same time to be director of the Art Institute of Chicago. Her reasons, it was said, had to do with her devotion to her work as a curator - what she calls her " great passion about works of art. "

When the Philadelphia post was offered to her again this year she continued to demur, according to a member of the museum's board of trustees. " But she thought about it and decided it was time," said the trustee, who requested anonymity.

"In a sense, one doesn't lose one's field; one gains a museum," Ms. d'Harnoncourt said this week, explaining her change of heart. " But it is a major decision about one's life."

Though she is reluctant to speak specifically about her plans for the museum, she does say this: "Renewed and increased emphasis on the collections ( as opposed to special exhibitions ) is extremely important. While there's no question that the collection is known and admired internationally, it would be nice if it were even more so."

In many respects, d'Harnoncourt, 38, was born to the director's chair. Indeed, as a youngster, she toddled around the one occupied by her distinguished father, the late Rene d'Harnoncourt, who served as director of New York's Museum of Modern Art from 1949 until shortly before his death in 1968. By all accounts, father and daughter were extremely close.

They even shared some physical attributes. At 6-foot-6, he was a commanding presence. So is his daughter, a statuesque 6 feet tall - and 2 inches taller in high heels. (Six-footer Scott quips that the new management team is "12- feet-2." )

Despite her stature, she projects an almost girlish charm, even down to the full-skirted, puff-sleeved Nipon dress she wore the day her appointment was announced.

Through her family and her work, she has met so many important artists and collectors - Marcel Duchamp, Georgia O'Keeffe, Nelson Rockefeller, to name just a few - that she has trouble recalling specific incidents, saying half ruefully, "I often wish I could replay it again for myself and pay more attention to what went on."

Her earliest museum memories are of "scampering down the halls of the Museum of Modern Art as a child," Ms. d'Harnoncourt recalled earlier this week. " It struck me as a natural and pleasant place to be, but I never thought of it as a career. I had visions of being an actress, or in government."

A native New Yorker, she graduated magna cum laude from Radcliffe with a degree in history and literature, then "realized I wanted to spend increasing amounts of time" studying art.

Accordingly, at London's renowned Courtauld Institute, she underwent "a marvelous kind of immersion in the history of art" and eventually realized that her father's zest for museum work " must have sort of oozed into me over the years." After a brief stint at London's Tate Gallery, she came to the Philadelphia Museum of Art in 1967 as a curatorial assistant, an apprentice- level position.

Her career blossomed. From 1969 to 1971 she was assistant curator of 20th- century art at the Art Institute of Chicago. She returned to Philadelphia in 1971 as an associate curator.

In many ways, her new job will require some of the attributes of the careers she once fantasized about - politician and actress. She will preside over an institution with an annual budget of nearly $10 million - one that depends heavily on governmental support and attracts thousands of visitors every week.

There is little question among museum insiders that she is perfect for the job. Edwin Wolf 2d, head of the Library Company of Philadelphia, refers to her "cool competency." Joel Bloom, director of the Franklin Institute museum, praises her " fine analytical mind" and adds, " She has tremendous presence.

"I've served with her on many panels and advisory committees," says Bloom. "She's a delightful and persuasive person. She has a joie de vivre which is infectious. I have no doubt at all that she'll be great. "

Bloom recalls that Ms. d'Harnoncourt "taught me what little I know about contemporary art."

"She's a wonderful teacher," he adds. Once when Bloom confessed to having trouble appreciating modern art, Ms. d'Harnoncourt reassured him by saying, " Contemporary art is like mushrooms. It's an acquired taste."

Her appointment as part of a new management team, with Scott as paid president, is seen as the beginning of a new era for the museum, which in recent years has been plagued with financial troubles and dwindling attendance. Built and maintained at city expense since it opened to the public in 1928, the museum had been run - some say into the ground - by a small group of amateurs.

For years, the museum's pedigreed and moneyed trustees passed the hat to pay for programs. When that approach no longer sufficed, they began to borrow from the museum's endowment and run up deficits.

Consequently, the museum entered 1981 with an endowment of only $18 million - considered paltry in comparison, say, with the $131 million endowment of New York's Metropolitan Museum of Art; a deficit of $500,000, and a $2.9 million contribution from the city that no longer covered the cost of keeping the building open to the public.

As a result, more than half of the museum's 200 galleries were closed most of the time, and the entire museum was closed two days a week.

The picture is considerably brighter today: Thanks to an extra appropriation of $250,000 from the City Council, all of the galleries are open Wednesday through Sunday, and most galleries are also open on Tuesday, though not all at the same time.

Earlier this year, the acclaimed Nigerian exhibition produced some of the highest attendance figures in the museum's history, and a record of 20,000 visitors in a single day.

But to many, the most encouraging sign yet is the executive reorganization of the museum. Outgoing director Jean Sutherland Boggs, who leaves July 1 for a museum post in her native Canada, will be replaced not only by Ms. d'Harnoncourt, but also by Scott, under the arrangement the board of trustees approved unanimously this week.

"I'm very excited about it," said Diana Dorrance, an influential member of the board of trustees. Of Ms. d'Harnoncourt's appointment she added: " It's about time we got somebody from our own ranks. We've got a period ahead of us that's going to swing like mad. "

In private life, Ms. d'Harnoncourt is Mrs. Joseph J. Rishel, wife of the museum's curator of European painting and sculpture. As has been noted often in recent days, she will be her husband's boss.

"It strikes some people as odd, but we've been working together for a long time," Rishel says of the arrangement. " I think it's grand. I think she'll be superb."