TEHRAN, OCT. 17 -- Ayatollah Ruhollah Khomeini sent his personal congratulations to the Iranian Revolutionary Guards "for their heroic deed" after yesterday's Silkworm missile strike on a U.S.-flagged oil tanker in Kuwaiti waters, informed sources said today.

News of the missile attack was cause for celebration here.

"This is a morale booster for the Iranian nation, which was greatly depressed over the American strikes on Iranian vessels and the Revolutionary Guards' failure to respond to them," said M. Ansari, editor of the state-controlled English-language daily Tehran Times. "Iran has finally taken the revenge promised by its leaders."

When President Ali Khamenei broke the news of the attack at the weekly Friday prayer service at Tehran University, tens of thousands of Iranians raised their hands and began chanting, "The Persian Gulf will be Reagan's grave."

They burst into laughter when Khamenei said, with a smile, "Where the missile came from, the Almighty knows best."

After the prayer session, the crowd paraded through the city, chanting slogans that urged Iran to continue fighting Iraq and the United States. At Revolution Square, teen-agers wearing military uniforms handed out candy to passers-by to celebrate what they called a victory over America.

Last night, teen-age soldiers painted fresh anti-American slogans on walls around the city and erected life-size posters near the former U.S. Embassy, now a training center for the Revolutionary Guards.

The posters showed a young boy, with explosives tied around his body, lying in front of a U.S. tank.