A potential witness in the prolonged investigation of Secretary of Labor Raymond J. Donovan was waiting to be called before a federal grand jury in New York this week when his son was murdered in a mob-style slaying, it was learned yesterday.

William P. Masselli, 55, a reputed member of the Genovese family of the Mafia, had been brought to New York from an upstate federal prison Tuesday on a writ obtained earlier this month by special prosecutor Leon Silverman.

Masselli's son, Nat, 31, was shot to death the next night when, police say, a passenger in the car Masselli was driving fired a bullet into the back of his head.

His father was scheduled to appear in Brooklyn yesterday before a federal grand jury working under Silverman's supervision.

Silverman refused yesterday to comment on the session. The grand jury's customary meeting room at the U.S. courthouse in Brooklyn was reportedly deserted.

At Silverman's request, FBI officials are investigating the murder of the younger Masselli in an effort to determine whether it was meant to impede the Donovan inquiry.

"The time sequence makes it very much look that way," one source close to the investigation said. But the source also cautioned that "these people are so frequently into things where elimination of an individual is part of the operation."

William Masselli had been president and chief operating officer of Jopel Construction and Trucking Co., an excavation company that grew into a multimillion-dollar-a-year business as a subcontractor on New York City subway projects for Donovan's company, Schiavone Construction.

Nat Masselli worked as office manager and bookkeeper for Jopel and was helping carry on his father's business under a new name after his father was sent to prison in February.

Sentenced to a seven-year term on hijacking and narcotics charges, Masselli was sent to the federal correctional institute at Raybrook, N.Y. On Aug. 11, however, Silverman obtained a writ calling for Masselli's appearance in Brooklyn yesterday.

Prison officials said Masselli was transferred Tuesday to the Metropolitan Correctional Center in Manhattan in response to the court order.

Nat Masselli was killed about 8:20 p.m. Wednesday at the wheel of his Lincoln Continental near Van Cortlandt Park in the Bronx. Police said witnesses saw one or two men jump from the Lincoln after the shooting and get into a car that had been trailing the Lincoln.

Silverman has been investigating allegations that Donovan, as a Schiavone executive, had numerous links to organized crime, including assertions that he met with William Masselli and other gangland figures during the 1979 Super Bowl week in Miami.

Donovan denied any such associations and testified last year at his Senate confirmation hearings that he had not been aware of Masselli's ties to organized crime.