As an outgrowth of the new era in Soviet-American relations, the United States has been casting a far more benign eye toward Moscow's allies in Eastern Europe, engaging in contacts that would have seemed impossible just two years ago.

For years, Washington tended to look on the East Europeans as submissive stepchildren of Moscow, with little room for maneuver either in their internal or external policies.But since the advent of the Gorbachev era in 1985, the Reagan administration has been quietly expanding its contacts among East bloc countries, especially Poland and Hungary.

These efforts bore fruit this past week with the first visit ever to Washington by a Hungarian Communist Party leader and the first in nine years by a Polish foreign minister.

Contacts elsewhere have been accelerating as well. Deputy Secretary of State John Whitehead, who has been given special responsibility for Eastern Europe, has visited each of the bloc countries at least twice.

The assistant secretary of state for European affairs, Rozanne Ridgway, has had a particular interest in Eastern Europe since her days as ambassador to East Germany and has worked hard on developing closer ties with bloc countries.

There has been a more active dialogue with Bulgaria lately. But Romania, which once received special treatment because of its willingness to disagree with Moscow, has fallen from favor after renouncing a beneficial trade arrangement it had with the United States.

U.S. relations with Poland hit bottom in 1981 when the administration slapped on a series of sanctions after Polish authorities imposed martial law. The administration responded to gradual political liberalization by lifting sanctions one by one until the last of the measures was lifted in 1987.

"We have normalized our relations," Foreign Minister Tadeusz Olechowski said Thursday after a meeting with Secretary of State George P. Shultz. He invited Shultz to reciprocate his visit.

More noteworthy was the visit the previous day of Hungarian Communist Party leader Karoly Grosz with President Reagan. Grosz, who was named to that post in May after serving as premier for the past year, has done much to alter Hungary's image as the hapless victim of Soviet heavy-handedness, reflected in the Soviet Army's crushing of an anti-Soviet revolt in 1956.

Like Mikhail Gorbachev, Grosz is an advocate of economic and political reform to remedy Hungary's economic problems, winning plaudits from U.S. officials for his daring departures.

"We have been impressed with your openness to new ideas," Reagan told Grosz on Wednesday.

As Grosz carried out his U.S. travels, it was sometimes easy to overlook his Marxist underpinnings. He spent 11 days on his U.S. tour, moving easily among business people and others while visiting California, New York and Illinois, where he witnessed the signing of a $115 million joint venture between a U.S. glass firm and a Hungarian enterprise.

Both Poland and Hungary are plagued by huge foreign debts and are eager for greater access to U.S. markets. But as Warsaw Pact allies of the Soviet Union, their purchases of American products will have to be limited to non-strategic items.