Alleged former heroin kingpin Linwood (Big Boy) Gray and insurance executive Harry L. Staley were convicted today of conspiracy to threaten the life of Washington lawyer Kenneth M. Robinson and to avoid seizure of Gray's suburban Maryland home by government tax agents.

Gray and Staley showed little emotion as a jury returned the verdict in federal court before U.S. District Judge Joseph H. Young. The jury had deliberated about 6 1/2 hours.

The verdict came at the end of a bitterly fought seven-day trial and represents a key conviction for federal prosecutors eager to keep Gray behind bars.

Gray, 39, has been held without bail since completing a five-year tax evasion sentence Dec. 15. He will be sentenced Feb. 25 and faces a possible maximum of 48 years in prison and $25,000 in fines.

Staley, 38, president of the Capitol Hill Insurance Agency in Washington, remained free on personal recognizance. He faces a possible maximum of eight years' imprisonment and $15,000 in fines when he is sentenced Feb. 26.

Prosecutors, who contend that Gray once operated a $30 million Amsterdam-to-New York heroin ring, have characterized him as unpredictable and violence-prone and linked him to five murders and the shooting of a federal prosecutor in Washington in 1978. Gray has denied the allegations and was never charged in the shooting or any of the slayings.

He also was acquitted in 1979 of masterminding the Amsterdam-to-New York drug operation but was convicted of tax evasion.

During final arguments to the jury this week, prosecutor David B. Irwin described Gray as an "evil genius" who lined up witnesses "one after another to do his bidding" in a desperate effort to beat the conspiracy charges involving the death threats against Robinson.

The case turned on whom the jury believed: Gray, a muscular, fast-talking man who admitted taking more than $300,000 in "fencing, loan sharking and bank robbing" over the years, or Robinson, a flamboyant criminal defense lawyer who had been granted immunity against possible tax fraud charges in exchange for his testimony against Gray, his erstwhile client.

The convoluted case originated with Gray's arrest in early 1979 on the heroin "kingpin" and tax evasion charges.

Gray hired Robinson, who said he and Gray agreed to a $75,000 fee: $15,000 cash and the deed to Gray's fully paid $60,000 home in Prince George's County. Robinson said he took out a $45,000 loan on the house, and Gray's common-law wife, Darlene Fleming, was to pay him $500 a month in rent to pay the loan note while she remained in the house.

When she failed to pay the rent, Robinson said he complained to Gray, by now convicted of tax evasion and serving his sentence in the Leavenworth, Kan., federal prison. He said Gray, in telephone calls, threatened to kill Robinson, his wife and two daughters if he persisted in demanding rent. He also said he learned through a Gray associate that Gray had "put out a contract to have me killed."

Out of fear, Robinson said, he allowed Fleming to live rent-free in the house and then gave the house up entirely, transferring it to Staley, a longtime Gray associate, at no cost except the assumption of the mortgage. Prosecutors contended Staley was in telephone contact with Gray and was acting as a "straw" owner of the house.

Gray and Staley denied the charges. Staley contended his possession of the house was proper, that Fleming paid rent, he provided improvements and otherwise acted like a legitimate owner.

Gray's version of the original fee agreement differed widely from Robinson's. He said Robinson told him the formal retainer agreement was a phony but legal document designed to prevent government seizure of the house for back taxes against Gray.

Robinson, he said, took both the house and $80,500 in cash from Gray and was to place them in a trust fund and borrow $45,000 on the house as his legal fee. Fleming, he said, was to live rent-free in the house, and interest from the trust fund was to pay the note on the $45,000 loan.

When two of Gray's codefendants from the 1979 heroin trial refused to pay a $10,000-to-$15,000 "bonus" that Robinson had demanded for his defense work, the lawyer demanded rent from Fleming instead, Gray said. This led to a dispute with Robinson, Gray said, but no threats.