President Reagan continues to make sharp gains in persuading the public that he has turned the nation's economy around, but concern is mounting over his conduct of foreign policy, according to a Washington Post-ABC News national opinion poll.

The contrast in public perceptions of these major aspects of the Reagan presidency is stunning.

By and large, the president's ratings on the economy are the highest, or nearly the highest, since he took office. But with growing concern over possible entanglement in Central America and an apparent stalemate in the Middle East, Reagan is drawing lower ratings than ever in foreign affairs.

The result appears to be a stalemate of another kind. With the economy boosting his appeal but foreign policy working against him, Reagan seems to be almost at a political standstill. He shows no improvement in his overall approval rating, but he has picked up slightly in trial heats against the two leading Democratic contenders for the presidency in 1984.

The economic news in the poll is almost all favorable for the president:

* Half those interviewed feel the nation's economy is improving, the sharpest expression of confidence on that point since Reagan took office. The new figure is a continuation of a trend first picked up by Post-ABC News interviewers in March. Until then, no more than 21 percent had seen improvement in the economy.

* By 52 percent to 46 percent, citizens said they approve of Reagan's handling of the economy. While not sparkling, that is the best rating he has had since October, 1981, in a Post-ABC News poll.

* By 54 to 44 percent, the public grades Reagan positively for his handling of inflation, the highest rating he has received since the Post-ABC News poll began asking that question last September.

* There is a noticeable increase in the numbers of those saying they are saving more money than they were able to a year earlier. In March, 1981, 8 percent told interviewers that they were able to save more, compared with the previous year. This March, the figure was 12 percent. In the new poll, conducted July 28 to Aug. 1, 16 percent said they are saving more now than a year ago.

Reagan's overall popularity rating might be expected to jump along with the growth in optimism over the economy. That occurred earlier in the year, when perceptions of the economy first began to become rosy.

However, Reagan's popularity rating has shown no improvement over recent polls. Today 52 percent say they approve his handling of the presidency and 44 percent disapprove. In June 54 percent approved and 44 percent disapproved. In May they were about the same.

The new poll strongly suggests that concern over the direction of foreign affairs is having a dampening effect for Reagan. Overall, 42 percent of those interviewed rate him favorably for his handling of foreign affairs and 49 percent unfavorably, his worst score in any of 17 surveys by the Post and ABC.

His rating is sharply more negative--33 percent approval and 48 percent disapproval--when it comes to his handling of problems in El Salvador and Nicaragua. By 54 to 29 percent, those interviewed express the concern that Reagan is leading the nation more toward war in Central America than away from it.

In tests against possible 1984 opponents for reelection, Reagan trails Sen. John Glenn (D-Ohio) by 50 to 43 percent among registered voters and is in a virtual tie with former vice president Walter F. Mondale, trailing by 48 to 47 percent.

Reagan has not announced whether he will be a candidate for reelection, but the poll strongly suggests that, at this moment, views on who should be president in 1985 amount to little more than a referendum on him alone. That is, most people appear to be lining up either to keep Reagan or to remove him, regardless of whom the Democrats nominate.

Backers of Glenn or Mondale tend to interpret their choice as more a vote against Reagan than as one for either Democrat. Reagan supporters, on the other hand, tend to say they choose him more because they approve of him than because they disapprove of his opponents.

In the bidding for the Democratic nomination, the poll shows 42 percent of registered Democrats preferring Mondale and 27 percent picking Glenn, about the same as in the June Post-ABC News poll.

In all, however, 65 percent choose Mondale and 56 percent choose Glenn as no worse than their second choice. Last month, Mondale was ahead by a wider 70 percent to 49 percent margin on that measure.

The Rev. Jesse Jackson, the black activist who is considering seeking the Democratic nomination, draws 8 percent from registered Democrats, the same figure as in June. The new poll shows Jackson siphoning support almost equally from Mondale and Glenn, while in June almost all of Jackson's supporters said they would back Mondale if Jackson were not in the running.

The other announced Democratic candidates trail in this order: Sen. Alan Cranston (D-Calif.), 6 percent; former Florida governor Reubin Askew, 4 percent; Sen. Gary Hart (D-Colo.), 3 percent; Sen. Ernest F. Hollings (D-S.C.), 1 percent.