Secretary of State Edmund S. Muskie said yesterday that release of the American hostages in Iran will be accomplished not by "dramatic gestures" such as a presidential offer to go to Tehran but by the "slow," painful approach" being followed by the Carter administration.

Referring to a possible impending resolution of the hostage impasse, Muskie said:

"We don't know if it's near or not. But if it is near, and if they're interested in sitting down at the table -- whatever the shape of the table -- we're ready to sit down and prepare ourselves to discuss any of the issues we've tried to anticipate that they might raise."

Muskie made this comment while answering questions during an appearance in St. Louis. He was asked repeatedly whether the administration has any sign that its campaign of conciliation toward Iran is making any headway and whether there is any foundation for recurring speculation that the 11-month hostage crisis might be coming to an end.

Repeatedly, Muskie replied that the United States is pursuing every available channel to make clear to Iranian leaders that it is in their interest to rid themselves of the hostage problem, especially now when Iran is engaged in a war with neighboring Iraq and seeking support from the international community.

He called attention to the hints from Tehran such as reports that the Iranian parliament, the Majlis, may address the hostage question imminently. But, Muskie added, "We've heard that kind of thing before" and cautioned: "Don't ask me to set a timetable."

Although rumors of a break in the long deadlock over the hostages have been building in intensity as the American presidential election approaches, administration officals have continued to insist both publicly and privately that they do not know whether events in Iran will produce the much-talked-about "October surprise."

President Carter, Muskie and other senior officials have missed few opportunities in recent days to coax Iran's revolutionary leaders in that direction. In addition to promising maximum U.S. flexibility in responding to Iranian grievances against the United States, Carter has said he would, upon release of the hostages, release approximately $8 billion in frozen Iranian assets and lift the trade embargo that has hampered Iran's efforts to obtain the spare parts it needs for its military equipment.

When Muskie was asked yesterday whether Carter should make some dramatic gesture such as an offer to go to Iran, the secretary said:

"I suspect there are any number of people at the top of your government who'd be glad to make that kind of dramatic journey if there were any evidence that it would achieve a result. We'd be prepared to do it at any time."

However, he continued, the approach that promises a better chance of success lies in the "slow, painful" process of waiting for the revolutionary ferment within Iran to settle and for the pressures building up on Iran through war, economic hardship and hostility from its neighbors "to convince Iranian leaders that it is in their interest to get this situation behind them."

"It is this assumption we are working on," Muskie said. "I hope we're right."

Speculation about a possible change in the hostages' status was increased by the revelation yesterday that Katherine Keough, the wife of William F. Keough Jr., one of the captives, met privately with Iranian Prime Minister Mohammed Ali Rajai while he was in New York over the weekend.

Keough told The Washington Post that she met with Rajai as a representative of the hostages' families and said their talk was "of a substative nature." But she refused to give further details because "our agreement was that it would be private." Asked if she expects a break in the hostage situation, she said, "I don't know."

State Department officials confirmed that Keough gave them a report of her discussions with Rajai, but they also refused to reveal any details of what was said.