For the first time, foreign visitors who are homosexuals will be allowed to enter the United States under most circumstances, the Justice Department announced yesterday. The only way homosexuals will face departation is if they voluntarily identify themselves as being gay.

The Justice Department's directive comes more than a year after the Public Health Service announced it would no longer permit its doctors at ports of entry to become involved in attempting to determine whether an individual is homosexual.

That decision had forced immigration inspectors to make such decisions themselves. Up until then, they relied on public health doctors to determine whether an individual was homosexual and therefore deportable under the law.

"It's an attempt to enforce a very difficult law . . . and at the same time not invade the personal privacy of the traveling public," Vern Jervis, spokesman for the Immigration and Naturalization Service (INS) said yesterday. "Obviously, no INS inspector nor anyone else in the agency has the expertise to determine homosexuality. This is the best way to enforce the law."

Under the new liberalized guidelines, immigration agents no longer will be permitted to question an individaul they suspect of being a homosexual unless the visitor first volunteers the information or a fellow traveler arriving at the same time identifies the vistor as a homosexual.

Even then, the agents will not be allowed to detain the suspected homosexual for possible deportation unless, under subsequent questioning, the individual confirms that he or she is a homosexual. If the individual denies being gay, the agents have been directed to allow the traveler to enter the country. The word of a fellow traveler alone will not be sufficient grounds for seeking deportation Justice said.

The Justice Department's new policy, which was reviewed by Attorney General Benjamin R. Civiletti, met with mixed reaction after it was announced yesterday.

"I suspect [homosexuals and people who support their rights] would have preferred that the administration simply eliminate the outrageous discrimination against homsexuals altogether," said Stephen Endean, executive director of the Gay Rights National Lobby. "In some ways, it's a sidestep. Only clear action on [a bill now in Congress that would remove homosexuality as a deportable offense] will resolve this matter."

"It puts the inspector right back in the middle of the controversy," said Michael Harpold, president of the union that represents immigration service employes. "The administration refuses to address the issue, the Congress refuses to address the issue. When you're asking for individual officers to make individual determinations, you're asking for all kinds of mischief. It can only reflect badly on the employes of the Immigration Service who will have to take the heat."

Since last August, when the Public Health Service said it would no longer assist the INS, immigration inspectors at ports of entry into the United States have had to rely on tips, their assessment of what they believe to be homosexual behavior, and other clues, such as whether the individual was wearing a Gay Pride button, to determine if the visitor is homosexual.

As a result, there have been several publicized instances in which travelers to this country were detained or forced to leave under circumstances that have been criticized by civil libertarians and gay rights advocates.