Two years ago, AFL-CIO President George Meany could look up and down Pennsylvania Avenue from his imposing headquarters on the 16th Street and see political IOUs sprouting from every crack.

Eight years of Republican drought were ending, and organized labor was ready to reap the harvest of the Democratic administration and lopsidedly Democratic Congress that it was helping to elect. By Labor Day 1978, the unions' most ambitious legislative program since the New Deal would be well on its way to enactment.

But it didn't turn out quite that way.

The program now lies crumpled in a congressional dustbin. Jimmy Carter and George Meany are periodically snapping at each other across Lafayette Park. And union leaders are claiming that the "radical right," bankrolled from corporate profits, is out to get the entire labor movement.

The dimensions of labor's despair can be read in the contrasts between Meany's Labor Day messages of 1976 and 1978.

Two years ago he spoke in hopeful tones of the Bicentennial spirit good confidence in the electorate's good judgement. This year he declares that the labor movement is "under concerted attack . . . the target of a vicious, distorted and unfair barrage of propaganda."

An adiministration official, one of the few who is close to organized labor puts in this way:

"I've never seen them (union leaders) so low. They know they're on the run, they see everyone coming at them, and part of it is their own damn fault. They're dreaming about what they can accomplish and are not able, or aren't trying, to convince their people that it matters. Then there's the 'old man' image that's personified by the 'old man' (the 84-year-old Meany) himself. They've got real problems."

Whether the source of the unions' problems is a conservative resurgency, self-imposed shackles or shifting economic and social forces that are straining most time-worn institutious is a matter of debate.

But the problem is real, and it isn't confined to Washington.

Labor's difficulties along Pennsylvania Avenue mirrror's its difficulties in getting and keeping the allegiance of a dramatically changing work force that is increasingly young, well-educated, mobile, female and employed outside the old factory strongholds of the union movement.

The image of labor leaders scrapes the bottom in public opinion polls, usually saved from last place by politicians of one sort or another. New and younger leaders (usually meaning white males in their 50s) are moving to the top of many unions, but there is a general assumption that major changes in direction will not occur until the durable Meany steps down - if then.

The unions' problems are compounded by their success in lifting their members into the middle class, where $15,000 to $20,000 a year dulls the taste for a redistribution of wealth, mortgages curb any zeal for military, and property taxes cool the ardor for helping the poor.

At the same time, just as businesses have improved their lobbying in Washington, they are getting shrewder back home in fighting unions and capitalizing on their weaknesses at the bargaining table - trading "Pinkertons for lawyers," as one union leader complained recently.

Jobs by the thousands are moving south to the Sun Belt, where resistance to unions remains strong. General Motors coexists with the United Auto Workers in Michigan but locks it out in Oklahoma.

Most big unions have continued to prosper at the bargaining table, although inflation has reduced the effective buying power of their gains. Major contract increases have been running about 10 percent a year, with union wages outstripping nonunion ones by about 15 percent.

But there is a price here, too. In construction trucking and coal mining, for instance, expensive labor costs and other problems have contributed to a substantial growth of nonunion firms, thereby reducing union influence on those industries. In many construction trades, unions are now settling for below-par contracts in order to compete for jobs, and there is speculation that nonunion competition may be more effective in controlling the cost of next year's Teamster bargaining than any anti-inflation arguments the Carter administration can muster.

It is the area of recruiting and keeping members that some of the most serious erosion has occurred.

The unionized portion of the total work force has been on a steady decline, hitting a post - 1930s low of 20.1 percent in 1976, the last year for which the government's Bureau of Labor Statistics has such figures. For the first time in 15 years, there was a net loss of union members, about 767,000 from 1974 to 1976. Public employe unions made substantial gains, but not enough to offset losses in industrial and craft unions.

Moreover, unions have been losing a steadily increasing proportion of representation elections, dropping to only 46 percent last year and showing no signs of improvement thus far this year, according to the National Labor Relations Board. The number of decertification elections has doubled in four years.

Union organizaing efforts have been spotty at best. Construction unions, under the gun of intense nonunion competition, are only now beginning to recruit members after generations of restrictive membership practices. Some unions that have been organizing regularly have had to step up the pace just to keep even with job losses to foreign competition, mechanization and other threats. Organizing in the South has run up against a solid wall of "right-to-work" laws that ban union shops, and there has been little headway in this region of major job growth.

In was against this backdrop - and the auspicious signs of a Democratic White House and a Democratic Congress - that the AFL - CIO marched so optimistically down Pennsylvannia Avenue two years ago.

In addition to such "unfinished business" as passage of a construction site picketing bill vetoed by President Ford, labor swung its weight behind job expansion programs, a new minimum wage law and the so-called "labor law reform" package to make it more difficult for employers to thwart organizing and bargaining drives.

One by one, most of the proposals got shot down, starting with the picketing bill and winding up with the labor law package. Labor could claim a victory on passage of job-creating measures and compromise legislation raising the hourly minimum wage from $2.30 to $3.35 by 1981. But that was about all.

Meany and his troops had to fight to bring the administration along on the minimum wage and have had a running battle with the White House from the start over inflation policy, with Meany staunchly resisting White House pressure to clamp down on wage increases. On top of it all, Meany, the Bronx plumber, and Carter, the Georgia peanut farmer, simply do not hit it off very well.

But most of labor's problems have been with Congress, where many lawmakers elected with union help now feel free to go their own way, often in open conflict with the union leaders who endorsed them and channeled money into their campaigns.

Many reasons are cited, including a decline in party discipline in Congress, labor's shrinking ranks and old-fashioned lobbying techniques, and a well-oiled, sophisticated coalition of business and conservative forces that relies on both massive direct-mail pressure and highly personalized contacts from local business leaders.

"What's happened is that we've been outhustled, outworked and out-spent by the right wing, including corporations as well as conservatives . . . in dealing with a Congress that's very, very responsive to group pressures," says UAW President Douglas A. Fraser. A "greatly weakened executive branch" hasn't helped the matter any, he added.

"The business lobby has been very effective in riding the wave of anti-government feeling and translating it into opposition to regulation of business . . . especially small business," said Tom Donohue, executive assistant to Meany. "I don't know how we deal with it but we've got to keep trying." He said he sees no change in the near future.

Sen. Harrison A. Williams Jr. (D-N.J.), sponsor of the labor bill, raises another point. Many of the bills that labor champions - cargo preference, construction picketing, even labor law revision aimed at unorganized workers - fail to "rally the labor movement as a whole." Moreover, he notes, a union member who earns enough to qualify for the "economic mainstream" may care more about inflation and tax relief than labor laws.

The AFL - CIO and individual unions are tightening the screws somewhat on wayward lawmakers when it comes to endorsing candidates and dispensing campaign money, but no major strategy change is in the works.

"They may call us paper tigers but there are some places we can be very, very effective - in primaries, in fund-raising, in education to members," said Victor Kamber, who directed the AFL - CIO's task force on legislation.

Al Barkan, head of the AFL - CIO's Committee on Public Education, told a story recently that has some bearing on labor's plight. In South Carolina, Democrat Charles Ravenel took the politically risky position of embracing the labor bill and attacking the Carolina - based J.P. Steven textile firm in his Senate race against incumbent Republican Strom Thurmond. Thurmond is going into the race with $2 million, said Barkan, and labor has so far produced a grand total of $60,000 for Ravenel.