MOSCOW, NOV. 16 -- Raisa Gorbachev appeared unannounced at the opening of an American art show here today and promptly stole it with an impromptu critique of the efforts of Whistler, Sargent and Homer and an artistic display of her own style of public diplomacy.

With a small crowd of Soviet dignitaries in tow, Mrs. Gorbachev swept briskly through the Smithsonian-sponsored exhibition of 19th- and early 20th-century paintings, pausing at one point to gasp before a particularly expressive Whistler, at another to have her photo taken with an American woman, and all the while chitchatting with industrialist Armand Hammer, fielding questions from reporters and offering a running commentary on American art.

Then, in a rare question-and-answer session with Western reporters, she spoke of her hopes for the success of the upcoming summit meeting and of the "spirit of goodwill" being expressed by ordinary Americans. All in all, it was a performance that might be taken as a fair preview of what Americans can expect when she and her husband, Soviet leader Mikhail Gorbachev, arrive in Washington for the summit Dec. 7.

In off-the-cuff remarks to reporters, Mrs. Gorbachev said she and her husband have been flooded with letters from Americans welcoming the couple to the United States and extending personal invitations to their homes.

"Every day we get an enormous amount of letters," she said. "People of all ages, of all walks of life write to us ... Many asked us to visit their towns, cities, and states, to visit their farms, their homes. Some of them even sent the keys to their houses in envelopes."

One letter from Boston she singled out for special comment. It was from a teacher, she said, who expressed "his profound satisfaction that at last we started together to take out the bricks from the wall of terror, and he expressed his hope that we would be able to construct out of these bricks a monument to peace and an edifice to peace."

She said she wanted to express her gratitude to all those people for their friendliness and good wishes, and that she was very interested in meeting Americans. "But our main hope," she added, "our common hope together with you, is that as a result of this summit meeting our world will become a safer place to live."

The Gorbachevs are expected to limit their American visit to three days in Washington, but Mrs. Gorbachev said she would, "of course," like to travel to other American cities. "Let's hope there will be other visits," she added.

The art exhibition, titled "New Horizons: American Painting 1840-1910," is the fruit of a Soviet-American cultural exchange agreement signed at the first meeting between Kremlin leader Gorbachev and President Reagan in Geneva. It will tour three cities here during the next 10 months, giving Soviets a rare glimpse of the work of such American artists as Homer, Inness, Cassatt, Sargent, Whistler and Eakins.

The show gave Mrs. Gorbachev the perfect backdrop for her own exhibition of the open, gregarious style she and her husband have displayed in previous trips to the West. Stylish as ever in a black and white wool suit, purple blouse and black pumps, she attracted as much attention as the art.

"It has its own national character," she said of the show, "but we found many things in common" between American realism and Soviet impressionism. "All this represents a new step, a new step in our getting to know each other better." It represents, she said, "a greater trust towards the monumental friendship which was written in the letter ofthe teacher from Boston."

Mrs. Gorbachev occasionally offered comments to Hammer. "Are you going to make it," she once asked, taking the 87-year-old industrialist by the arm. Pausing next to a Rockwell Kent, she turned to Hammer and said, "We know his works very well. The atmosphere, the depictions of nature."

She spoke fondly of Sargent and a number of other artists, but saved her highest praise for Whistler's "Nocturne." "There is a sense of music," she said, "and of dreams about it. Dreams, fog, night. It's unusual."