President Reagan's cool relations with organized labor were highlighted here today as he participated in a by-invitation-only ceremony at Gracie Mansion while thousands of union workers marked Labor Day with a march to which the president was not invited.

"Now, some of us have come from another Labor Day celebration, some have not. But next year we should all come back and march together," Reagan said as he presented Mayor Edward Koch with a symbolic check representing the $85 million first federal payment for a new West Side, six-lane highway project known as Westway.

"On a day like today we prove that the American people control their government," the president said of the controversial decision to build the expensive highway. Reagan won union support here by pledging during his campaign to make the full $1.3 billion federal payment if elected.

Some workers without "control"--fired members of the Professional Air Traffic Controllers Organization--protested outside Gracie Mansion's gates, but their chants could only be heard faintly inside and did not trouble Reagan or the other speakers.

The occasion was a mixture of Labor Day rhetoric and New York politics starring, in addition to Reagan, Koch, another politician who has rocky labor relations.

The mayor, having captured the nomination of the Republican Party as well as his native Democratic Party in his reelection bid, faces two primaries Thursday. Although he is as close to a sure thing as a politician can be, Koch used today's rally to cement relations with his new Republican friends.

The invited guests were an unlikely combination of Republican politicians, Republican fund-raisers and representatives of those building trades unions that love Westway for its promise of thousands of jobs.

A Republican mayor could hardly have welcomed Reagan more warmly. The generally popular mayor also had no difficulty with his past opposition to Westway, describing the years when he pledged adamantly to stop the highway as a time when "I had doubts about Westway."

Reagan began his remarks with warm words for Koch and a joke about controversial Interior Secretary James G. Watt.

Watt "would have been here but he's working on a lease for strip mining the Rose Garden," Reagan said of the man who has outraged environmentalists around the country.

The president likened his effort to cut the federal budget to Koch's reductions of New York spending following the city's near bankruptcy. There is one difficult thing about cutting expenses, Reagan joked: "The 'expenses' can vote."

Reagan said that "any worker knows a job is the best social program there is."

He predicted that his economic programs will bring a new age for American workers. "The key to everything we're trying to accomplish is jobs," Reagan said. He forecast that there will be 13 million more jobs by 1986, 3 million more than are expected because of normal growth.

"Our policy has been, and will continue to be, what is good for the American worker is good for America," Reagan said, repeating words from his Labor Day message issued by the White House Sunday.

There were some shiny blue-and-white hardhats in the audience and the president wore a white one labeled "Westway" as he posed for photographs with Koch, New York Sens. Daniel P. Moynihan (D) and Alfonse D'Amato (R) and the symbolic check.

About 1,300 people had been invited to witness the event on the steps of Gracie Mansion, the mayor's residence, but only about half that number interrupted their holiday to attend.

Presidents traditionally seek a labor audience to address on Labor Day, usually choosing events sponsored by mainstream unions. Today's host, Koch, and guests were a departure from the usual.

Koch marched on Fifth Avenue with the disappointingly small crowd of less than 100,000 union workers. He was booed, jeered and the target of obscene gestures from many in the march.

He told the marchers, who were led by AFL-CIO chief Lane Kirkland, that it had been a mistake not to invite Reagan to join them. The workers responded with more jeers.

The president ended his brief remarks with the assertion that is central to his view of the present and future of the nation:

"There's a new spirit sweeping this country, a spirit borne from the values, energies and dreams of our working people."

"And on this Labor Day of 1981, let each of us commit ourselves again to the renewal of America."

Koch stood by the symbolic check and said that while he didn't want to denigrate the efficiency of the Postal Service, "I'm always happier when the check is in my hand."