President Reagan's address to the nation Thursday produced a dramatic turnaround in what had been flagging public support for his handling of events in Lebanon and foreign affairs generally, according to a nationwide Washington Post-ABC News poll.

In addition, the speech bolstered support for Tuesday's invasion of Grenada, according to the survey.

At the same time, however, there are signs of possible longer-term problems for the president. For example, there is strong disagreement with his statements that the U.S. Marines' mission in Lebanon has been successful; large numbers say U.S. goals in Lebanon are unclear, and the vast majority of citizens polled wants Congress to take a greater role in deciding how troops are used in Lebanon and Grenada.

The Post-ABC News survey was conducted in two stages. A random sample of 729 people was interviewed Wednesday, three days after the terrorist bombing deaths of more than 225 Marines in Lebanon and one day after the invasion of Grenada. An additional 517 people were interviewed Friday, a day after Reagan made his televised address.

The change in thinking was sometimes startling:

* On Wednesday, by 53 to 41 percent, a majority said they disapproved of Reagan's handling of the situation in Lebanon. On Friday, by 52 to 42 percent, a majority said they approved.

* On Wednesday, by 50 to 44 percent, those interviewed said they disapproved of Reagan's handling of foreign affairs generally. On Friday, by 57 to 39 percent, a majority said they approved.

* On Wednesday, 52 percent said they approved of the invasion of Grenada and 37 percent said they disapproved. On Friday, after the president's speech, 65 percent said they approved and 27 percent said they disapproved.

* On Wednesday, 58 percent said the United States was trying to do too much with its armed forces overseas. On Friday, that figure was down to 48 percent.

In each instance, almost all movement in support of Reagan came from people who told interviewers on Friday that they had seen, heard or read about the president's speech. Only one-quarter of those interviewed that day said they were not familiar with the speech--and those people were sharply more critical of Reagan.

Whether support for Reagan will be long-lasting is unclear. A presidential speech can affect public attitudes, at least temporarily, and past polls generally have found the public rallying behind a president in time of military action or crisis--but not always staying behind him. The most recent example came in 1979 and 1980, when Americans at first backed President Carter after the takeover of the U.S. Embassy in Iran, then turned away from him.

The events of the last week have resulted in sharp changes, not only in views on Reagan but also on other aspects of the conflict in Lebanon as well.

In a Post-ABC News poll in late September, 21 percent of those interviewed said they felt that "what happens in Lebanon is important enough to the United States so that we should risk going to war there." In the new survey, 34 percent took that view (33 percent before Reagan's talk, 35 percent after it).

In September, 42 percent said the United States would become so involved in the fighting in Lebanon that we would go to war there; in the new poll, 52 percent felt we would go to war there (54 percent before Reagan's speech, 49 percent afterward.)

Americans feel by more than 2 to 1 (65 to 30 percent) that the deaths of the Marines could have been prevented, despite administration statements that there was no way to stop a suicidal attack of the kind that took place last Sunday.

And although Reagan has described the Marines' mission in Lebanon as "successful overall," those interviewed feel it has not been successful by a ratio of 62 to 29, with little difference from Wednesday to Friday.

In addition, by 49 to 39 percent, citizens say the nation does not have clear goals for the Marines in Lebanon. That figure showed almost no change from Wednesday to Friday. However, 7 in 10 citizens say that should the Marines withdraw, then Syria, backed by the Soviet Union, will take over Lebanon.

Forty percent of those polled said the United States should "find and militarily punish" those responsible for the attack on the Marines, even at the risk of a larger war; 56 percent opposed such an action.

However, when asked whether U.S. and Israeli troops together should "push the Syrians out of Lebanon by force"--with no mention of retaliation for the attack on the Marines--support was divided but considerably higher. Forty-seven percent said yes, 45 percent said no.

Three in every four interviewed say they agree with the statement that "Congress should immediately strengthen its role in how American armed forces are being used in Lebanon." Congress has given Reagan authority to keep the Marines in Lebanon for 18 months, and half the public, according to the poll, feels that time limit is too long.

Responses toward questions dealing with Grenada raise the possibility that perceptions of how the United States should respond to strife in Central America may be changing. In polls until now, the public has been overwhelmingly against sending troops to El Salvador or trying to overthrow the government of Nicaragua, the two main trouble spots before Grenada.

But the new Post-ABC survey asked this question for the first time: "Do you think that in some cases U.S. troops should be used to overthrow Communist-controlled governments in Central America and the Caribbean, or don't you think U.S. troops should be used that way?"

In all, 41 percent approved of such military intervention and 49 percent opposed it, with virtually no difference in results from Wednesday to Friday.

Because the question is new, it is not certain that more people now would support intervention. However, these figures are about twice as high as found in earlier polls with questions worded differently.

The public was divided on the degree of danger Americans faced in Grenada before the invasion. Thirty percent said there was a great deal of danger, 25 percent said there was a fair amount of danger, 25 percent said there was some danger, and 13 percent said there was not much danger.

By 48 to 36 percent, those interviewed said the purpose of the invasion was more to protect the Americans there than to overthrow the Marxist generals who had taken control of the country.

Opinions on the restrictions put on news media coverage of the invasion of Grenada were split sharply. Forty-seven percent said the government "is trying to control news reports out of Grenada more than it should;" 45 percent said the government was not exerting excessive control of the news media.