In the face of evidence of increasingly widespread dissatisfaction with her government, Prime Minister Margaret Thatcher staunchly defended her record today, saying that she did not believe "that people want to throw away all that has been gained."

In a speech to the Scottish branch of her Conservative Party, meeting in Perth, Thatcher said that the government had lived up to its promises to balance the national checkbook and curb trade union power. She promised to "show the same guts" in addressing the currently pressing problems of unemployment, health and education.

The speech was Thatcher's first major public appearance since the Conservatives suffered the loss of a parliamentary seat and substantial local government setbacks in elections on May 8. Since then, the Tories have been buffeted by a tide of further bad news.

Monthly figures released for April showed a 1 percent drop in manufacturing output, and the Employment Department was obliged to note a continuing upward trend in joblessness.

On Wednesday, government-owned British Shipbuilders announced it would have to close three shipyards and let go an additional 3,500 employes, bringing its total work force down to 5,500 by next year from a 1977 total of 34,000. Although Thatcher said the cuts were necessary because of declining orders for merchant vessels in a flooded world market, the news brought accusations from both sides of the political aisle in this maritime nation that the government was allowing a national industrial symbol to deteriorate.

News of the shipyard closings coincided with an announcement by British Caledonian Airways that it plans to cut 1,000 jobs because of decreased bookings on trans-Atlantic routes in the aftermath of the U.S. attack on Libya.

Today, the one bright spot on the horizon -- a fall in the monthly inflation rate to 3 percent, the lowest in 18 years -- was overshadowed by news that 4,000 more jobs are to be cut by British Rail's engineering division.

A Gallup Poll this week showed the Conservatives in third place behind the Labor Party and the Liberal-Social Democratic alliance. Tory popularity fell to its lowest point in five years, at 27.5 percent compared with 33.5 percent just a month ago.

At the same time, Labor leader Neil Kinnock, whose own low popularity has been one of Thatcher's principal assets, appears to be entering a period of high and positive visibility. His own monthly Gallup rating went from 42 to 47 percent favorable.

In one of the week's more telling events, Kinnock was featured on the cover of The Economist, a magazine that frequently has treated him with undisguised scorn.

While a four-page profile inside described him as "verbose," with "no great originality of mind," it went on to call him "preeminently, a decent man" who has brought his party back from far-left oblivion and increasingly deserves to be heard.

As a number of commentators here have pointed out recently, the Conservatives may be suffering from the very success of their principal policies. Ten years ago, under a Labor government, inflation had reached 27 percent. The country was plagued by strikes, and Labor-allied trade union leaders enjoyed unbridled power.

Thatcher promised to change things and, as she pointed out today, she did. Yet it is Labor that now appears to be benefiting from the changes.

With the resolution of the problems voters felt the Conservatives were best equipped to deal with, the electorate has moved on to other concerns. Unemployment, problems in the educational system and a perceived deterioration in health care are the kinds of "social" problems that are thought of as "Labor issues."

In her rallying cry to dispirited Conservatives today, Thatcher exhorted them to defend achievements rather than listening to the demands of the opposition and worries of the fainter hearts within their own ranks. Keeping with party electoral strategy and her own oft-repeated judgment, she outlined no policy changes and promised to stay the course.

Instead of increased public spending on jobs, she has said, tax cuts and more streamlined industry are still the best way to stimulate the economy and improve social services for the long term.

The Tories, Thatcher said, "need no lessons" from the opposition on the domestic social issues that now dominate national debate. In a reference to foreign policy, she indirectly defended British aid and support of the U.S. raid on Libya. "It is because we care for Britain's reputation in the world," she said, "that we are a staunch ally, a courageous partner, playing our full part in the world community."

Describing a country indebted, isolated and moving toward totalitarianism under Labor, Thatcher said that "Britain's very destiny depends" on a Conservative victory in general elections that must be held within the next two years.

Today's speech to Scottish party activists appeared to have calmed their fears, as a number of delegates indicated to interviewers as they left the building. But it was likely to exacerbate divisions within the national party leadership, and inside Thatcher's Cabinet.