GOP presidential hopeful Ronald Reagan said today the U.S. government has an obligation to provide money to help ease unemployment if the recession deepens, because federal policies caused the economic decline in the first place.

"Of all the social reforms, the one that could do the most good is a job," Reagan told officials attending the annual meeting of the U.S. Conference of Mayors.

Referring to statistics showing that 19 percent of teen-agers and nearly a third of black teen-agers are out of work, Reagan said: "That is a problem we will have to face."

However, most of Reagan's message to the group of mayors was his familiar theme of eliminating federal restraints on spending by city officials of money sent from Washington.

"Money from Washington comes to the mayors with strings attached that ties their hands rather than permitting them to exercise discretion," Reagan said.

Mayors "are eager to assume a greater responsibility for the management of their cities than is permitted by the present failed paternalism -- which first takes money out of America's cities and then doles it out with endless strings attached," he said.

Republican Reagan came to the largely Democratic conference with apprehensions.

When he arrived this afternoon, Reagan told a group of Republican Party faithful, "I'm here for the mayors -- most of whom are Democratic. I don't know if I'll make any converts."

Republicans attending the conference organized an advisory urban task froce of 15 mayors -- including three Democrats -- to meet Reagan and give him advice about an urban strategy for his campaign. The group, headed by Mayor Richard Carver of Peoria, Ill., president of the Conference of Mayors, and Peter Wilson, mayor of San Diego, will probably meet again with Reagan during the campaign.

The inclusion of one Democrat in particular, Mayor Jim McConn of Houston, clearly had aides to President Carter here surprised and concerned. h

McConn later told a reporter that his presence on the task force did not mean support for Reagan.

But, he said, "I liked what he had to say. He was talking to a group of mayors. He wasn't going to say anything we didn't want to hear.

"A lot of my friends want to support Jimmy Carter and probably will in the end, but they are not totally pleased."

Democratic mayors, who were among Carter's earliest and most committed supporters, are in a cantankerous and disgruntled mood here. Conference corridors are filled with their complaints about Carter's failure to provide effective leadership.

Democratic and Republican mayors from the generally well-off Sun Belt cities tended to talk about their displeasure over what they describe as red tape and bureaucratic problems in dealing with federal agencies.

The Democratic mayors from the big industrial cities in the Northeast, hit hardest by the recession, are upset with what they repeatedly describe as the "budget balancing fever" that has led to proposals to cut federal jobs and social programs.

The most outspoken of the Democrats has been Mayor Edward Koch of New York who spent Saturday here. Koch, who criticized among other things the recent decision by Carter and Congress to cut jobs programs even as unemployment has been rising, asked: "Is the federal government going to bury its head in the sand like an ostrich? I hope not."

The New York mayor, who advocated federal aid to cities particularly hard hit by the recession and job programs, said he would continue to speak out when he disagreed with Carter administration policies, adding, "When you get my support, you don't get my silence."

Carter administration aides here said they believed that the president would be able to unruffle mayors' feathers when he speaks to the conference on Tuesday. Independent presidential candidate John B. Anderson is to address the group Monday.