A side corridor at the Hotel Roanoke this morning offered an incongruous scene of Democratic and labor politics. There, outside the meeting hall of the Virginia AFL-CIO's endorsement convention, stood a tight-lipped Charles S. Robb, the Democratic candidate for governor, reduced to shaking hands with a few stragglers because he was not allowed in.

Robb had wanted to address the convention to explain why he had decided to withdraw his name from consideration for the labor organization's endorsement. But the same coalition of labor leaders who had blocked the endorsement -- making Robb the first Democrat running for major statewide office in a decade to be so denied -- vetoed his request to speak.

It was stunning and embarassing rejection for Robb, who had worked hard in recent weeks for this endorsement but whose supporters estimated that he was at least 50 to 75 votes short of the 600 he would have needed to win. The action also was a setback for Robb's campaign strategy of holding his party's traditional urban-liberal-labor base while attracting conservatives wary of his GOP opponent, Attorney General J. Marshall Coleman.

Robb's opponent's here say his defeat should serve as a warning to conservative Democratic politicians elsewhere that they cannot afford to take organized labor for granted. Labor union spokemen, including representatives of the steelworkers, machinists, government employes, food workers and communications workers unions, said they had strong support for their national leaders, who are seeking to hold unsteady Democrats in Congress in line on labor issues.

"It telegraphs a message around the country that we're not giving endoresements to anybody who ties his coattails to Ronald Reagan," said Thomas McNutt of the United Food and Commercial Workers, a leader of the stop-Robb movement here.

The ultimate impact of the AFL-CIO rejection on Robb's chances for victory is unclear. Robb's strategists believe he can still win the backing of most the the state's unions, who will not abide what they see as Coleman's aggressively anit-labor campaign. But the process will be more arduous.

"All of the people here will vote for Chuck and most will work for him, because the Republicans don't hold any hope for working people," said Lechner. "But he'll have to organize county by county, city by city, local by local."

Also, Robb is certain to get considerably less money than organized labor traditionally had given Democratic candidates. In 1977, Democrat Henry Howell's unsuccessful campaign for governor.This year, Robb's supporters say he'll do well to get $100,000.

For the unionists, Robb's political sins included supporting Reagan's tax and budget-cut programs, opposing extension of the Voting Rights Act, and condemning collective bargaining for public employes. His key strategic mistake, they say, was in underestimating the depth of his opposition and believing he could win the enderestimating without making significant concessions on at least some of these issues.

"The whole thing could have been avoided, but I think Chuck was badly misinformed by Julian [Carper, state AFL-CIO president] and some of the other leadership," said McNutt.

Robb, Virginia's lieutenant governor, attempted to put the best face on this weekend's events, suggesting his decision to bow out would help heal the clear divisions here and make it easier for him to win support from individual unions.

"yit was my choice to submit a written withdrawl rather than speak," said Robb in a hallway interview. "Emotions are still running petty high . . . this will contribute to not creating any additional opportunity for tension."

As of late last night, Robb had planned to speak to the convention to announce his withdrawl. But his union opponents, some of whom feared a last-minute endoresement plea, said no. Some threatened to further humiliate Robb by snubbing him, while endorsing his two running mates, Richard J. Davis, candidate for lieutenant governor, and attorney general candidate Gerald Baliles.

Even as Robb spoke to reporters this morning, the convention erupted in choruses of boos and cheers for liberal Democratic Ira Lechner of Arlington, whose successful attempt to win the party's nomination for lieutenant governor earlier this year was backed by the same union leaders who opposed Robb here.

"There's a lot of hard feelings here," said Paul Askew, president of the Tidewater Central Labor Council and a Robb supporter. "Some of us feel Ira Lechner and his people have become the executioners of the Democratic Party."

Lechner, whose speech here emphasized opposition to Reagan and support for Democrats but did not mention Robb by name, refused to reply. "Anything I could say to that wouldn't be printable anyway," he said. r

Besides Robb, the clear loser here was Carper, who has been president of the state AFL-CIO since 1966. He has been under fire in recent years from younger liberal unionists, who say he is to timid politically to be an effective voice for labor. They claim that Carper promised Robb the endoresement earlier this year without winning meaningful concessions in return, a charge Carper has denied. Many believe this year's action was a prelude to challenging Carper for reelection next year.

Carper said he has not decided whether to run again nest year. He said he believes he would be re-elected, but concedes he was "embarrassed by the few boos we heard yesterday" when Robb spoke before the convention.

In the end, Robb and his supporters believed they lost here, not so much because of his conservative views, but becasue his endoresment got caught up in state and national union politics.