The new Social Democratic Party's unexpectedly strong showing in a parliamentary by-election in bedrock Labor Party territory in northern England yesterday has dramatically altered political assumptions in Britain and put additional pressure on embattled Prime Minister Margaret Thatcher.

The social Democrats, supported by the older Liberal Party, demonstrated by finishing a close second in the Warrington by-election that they could quickly become a major or even dominant force in British politics by offering voters a middle-of-the-road alternative to the leftward shift of Labor and Thatcher's righwing leadership of the Conservative Party.

Politicians and analysts agreed today that the Social Democratic candidate in Warrington, former Labor Cabinet minister Roy Junkins, benefited both from Labor's bitter ideological split, which had spawned the Social Democrats, and Thatcher's harsh economic policies and tough rhetoric during a deep recession with unemployment rising rapidly.

Jenkins won 42 percent of the vote in Warrington for the four-month-old Social Democrats. The winning left-wing Labor candidate, Douglas Hoyle, held 48 percent of the vote, compared to the 62 percent won in 1979 by the moderate Labor member of Parliament who recently vacated the seat. The Conservative vote collapsed from 29 percent in 1979 to just 7 percent for London bus driver Stan Sorrell, a senior party worker in Thatcher's own North London constituency.

Sorrell's demise confirmed the growing unpopularity of Thatcher's government and added greatly to the problems plaguing it. In addition to nearly two weeks of rioting in a large number of British cities, the recession has continued to deepen, with industrial output continuing to fall. The government's own economic analysts have concluded that there is no evidence to support assurances by Thatcher and her economic aides that an upturn would begin soon. Unemployment is expected to pass the 3 million mark this month, seen in Britain as a once unimaginable level of joblessness.

The Warrington results have been seen by many analysts and politicians as even more damaging for the Labor Party, from which most of the 14 Social Democrats already already in Parliament broke away earlier this year. As a union-based opposition party at a time of high unemployment, Labor normally would have been expected to hold or increase rather than lose most of its majority in one of its safest seats in the country.

Analysts and politicians, including many in Thatcher's Cabinet, have also expected the Social Democrats to make big inroads among Conservative voters, particularly in middle-class areas of southern England, where another by-election will be held in the autumn in the London suburb of Croydon. After Jenkins' strong showing in Warrington, Social Democratic and Liberal leaders are trying to agree on another nationally known candidate, possibly former Labor Cabinet minister Shirley Williams, to contest the seat vacated by the death of the Conservative who won by a narrow margin in 1979.

"There's hardly a seat in the sough of England that the Social Democrats and Liberals can't win now," said a gloomy Conservtive back bencher who opposes Thatcher's policies and the right-wing direction of the party.

Neither he or any other of her critics in the government expect Thatcher to be replaced by the party becuse she would fiercely fight such a move and could draw on still considerable personal loyalty among right-wing Conservatives in Parliament and constituency organizations. But he suggested that she may be forced by events to approve, despite strong opposition from her economic ministers, expansive emergency programs being pushed by other Cabinet ministers led by Employment Secretary James Prior. They would inject more government money into the economy and attempt to alleviate the particularly high unemployment rate among teen-agers and young adults.

Labor's deputy leader, Dnis Healey, described Warrngton today as a "serious warning" to his party. Healey is fighting to save his job from a challenge by leftist Tony Benn. Their contest, to be settled at the Labor Party's annual conference at the end of September, is seen as a potentially decisive batle in the struggle by more militant Socialists to gain complete control of the party. Healey's supporters fear many more Labor members of Parliament will defect to the Social Democrats if Healey is beaten.

An analysis of voter attitudes in Warrington by the respected Mori opinion polling firm here showed that half the voters switching from Labor to Social Democrats expressed convern that Labor was becoming too left-wing or extreme.

Jenkins, who said today he hopes to contest another by-election in search of a parliamentary seat, also considerably boosted his own standing with his showing after returning to British politics from five years as chief executive of the European Common Market.

He and Williams are among four coleaders of the new party, which will eventually have to choose a single leader. The Social Democrats and Liberals also must better cement their electoral alliance, which still could come apart over disagreement about which party should put up a candidate in a particular constituency.