Seven or eight months ago, it looked as if there might be major political realignments under way in both the United States and Great Britain. On this side of the Atlantic, the Republicans were making giant strides toward overtaking the Democrats' 50-year-old status as the majority party. And in Britain, the new Social Democratic Party, in alliance with the Liberals, zoomed from literally nowhere to the top of the public opinion polls, ahead of both the Conservatives and Labor.

Now, just a few months after this delicious possibility of political upheaval appeared, it seems to be fading. The Republicans' prospects of taking over the House of Representatives have been wrecked on the rocks of the recession. And in Britain, for quite different reasons, the SDP-Liberal alliance has come to a premature crossroads, with great uncertainty about its long-term prospects.

In two weeks, former Labor Party minister and Common Market chief Roy Jenkins will be running as the SDP candidate in a special election to fill a vacant Tory seat near Glasgow. It was Jenkins, more than anyone else, who gave the fledgling SDP its credibility by a near-miss in another by-election last year. His showing triggered a surge in the polls and a series of victories in other parliamentary and local elections.

Jenkins is regarded as the likely choice of the SDP membership as its first leader, but only if he regains a seat in Parliament on his second try. National polls this past month have shown the SDP-Liberal alliance losing ground, down five to eight points from late 198l, and falling into a near-deadlock with Conservatives and Labor.

On a brief visit to Washington last weekend, where she addressed the Americans for Democratic Action convention, Shirley Williams, another former Labor minister who was instrumental in forming SDP, acknowledged that the Glasgow Hillhead contest on March 25 is too close to call today. She expressed concern that Scottish voters may not warm to the English- Welsh Jenkins, but said she had made a personal bet on a Jenkins victory.

More broadly, she told a gathering of journalists and politicians, she and the other SDP founders had "underestimated the extreme difficulty of breaking a two-party system so deeply embedded in the class structure and the business-and-labor interest group system of our country."

She said she had no regrets about walking away from a Labor Party increasingly under the control of its unilateral disarmament, anti-Common Market ideologues and the Trotskyites who have infiltrated its grass-roots organization.

But she has come to see, Williams said, that the early victories, like her own return to Parliament in a November by-election, were achieved largely on a wave of protest against the old parties. Now, seeing the threat, Tories and Labor are turning against the interloper, and uniting to cut off its support.

But there is more to it than that, she acknowledged. The early surge was based on a "broad and frothy" support, without much in the way of organizational or intellectual underpinnings. She said 60 percent of the new party's members were political novices, easily put off by the nitty-gritty and the infighting of the process. During the eight-month surge of the new party's birth, it had only two paid staff members.

Now the press, which welcomed the novelty of the new force, is demanding to know exactly what it stands for. And the process of definition has produced strains between those, like Jenkins, who want a slightly diluted, humane-looking Thatcherism, and those, like Williams, who seek socialism stripped of any toadying to the unilateral disarmers, the turf-conscious union bosses or the Trotskyites.

Predictably, too, the effort to build an alliance between SDP and the long-established, unsuccessful third-party Liberals, has brought conflict about who gets to select candidates for the "gold" and "silver" seats, where there is the best chance of defeating a Tory or Labor member.

Last but not least, Williams said, there are signs of a Conservative comeback, keyed to a better showing by the battered British economy in such fundamental measures as productivity and foreign trade.

Lurking behind all these questions is one that has relevance for this country as well as Britain. She had a sense, this able and gutsy politician said, that in both her country and ours, there is still skepticism as to whether any politicians of the left are really prepared to give "tough answers" to the questions of inflation, deficits and costly bureaucracy that brought the Thatcher and Reagan governments to power 18 months apart.

She left her American listeners thinking, and admiring what is surely one of the most lively political minds on either side of the ocean.