Lawyers representing pediatricians and children's hospitals asked a U.S. District Court judge here yesterday to strike down the "Baby Doe" rule on grounds that it "directly injected the federal government into the hospital and the parent-doctor relationship."

Stephan E. Lawton, an attorney for the American Academy of Pediatrics, said the Reagan administration's rule regulating the care and feeding of handicapped infants was arbitrary and capricious.

He said the rule was improperly put into effect 17 days ago without allowing time for comment on it, and that Congress never intended to authorize such a rule when it prohibited discrimination against handicapped persons.

Neil H. Koslowe, the Justice Department attorney arguing for the administration, said the federal government is a "protector of last resort" when state child-abuse laws fail to protect infants born with handicaps.

The government was not trying to intrude into medical decision-making, Koslowe argued, but to ensure that "non-medical factors (such as the parents' views on retardation or concern over the costs of caring for a handicapped child) do not intrude on the decision-making process" and cause hospitals to withhold care.

Last May, the administration issued a warning following the much publicized "Baby Doe" case in Bloomington, Ind. In that case, a baby born with Down's syndrome died after his parents, backed by their physician and the courts, declined to permit an operation necessary to allow digestion. Down's syndrome is a condition that can lead to mental retardation and physical complications that require major surgery.

The new regulation, supported by "right-to-life" groups and formally endorsed by President Reagan, requires hospitals to post notices in delivery rooms and nursing stations that failure to feed and care for handicapped infants is against the law.

It also sets up a government hotline for complaints that would be investigated by federal officials. Violations of the regulation could lead to a cutoff of federal funds to the hospitals involved.

The pediatrics organization, while supporting the principle of preventing discrimination against handicapped infants, has sharply criticized the rule for being vague.

After the hearing, Lawton said that the academy "certainly does not condone the Bloomington situation as it has been described."

"We're not talking here about Down's syndrome," Lawton said. "We're talking about inflammatory signs in hospitals and 'Baby Doe' squads and team leaders" set up in hospitals to monitor compliance with the new regulation.

Elizabeth J. Noyes, speaking for the 24,000-member pediatrics group, said that the rule was "so vaguely drawn that it could apply to anyone," not just mentally retarded infants. The rule does not define what is an infant or what is a handicap, Noyes said.

During the 90-minute hearing, U.S. District Court Judge Gerhard A. Gesell repeatedly interrupted both sides, saying he was "probing because I have a difficult decision to make."

Koslowe, in response to Gesell's questions, conceded that there was no definition of "infant" in the regulation and no precise situation or type of illness that would trigger federal sanctions.

"There is a continuum," Koslowe said. Infants with Down's syndrome clearly would be covered by the regulation, although others with terminal illnesses might not be covered. Koslowe said the regulation ensured that whatever decisions hospitals made, the decisions would be based on "medical judgments" and not the parents' non-medical views.

Gesell said his "objective" was to rule on the case next week.