Gray died at his home in Atlantic Beach from complications from pancreatic cancer, said his son Ed Gray, of Lyme, N.H.
Just last month, Gray ended 32 years of silence about his role in the Watergate scandal, telling a television interviewer that he had reacted with "total shock, total disbelief" to the revelation that his former deputy, W. Mark Felt, was the secret Watergate source known as Deep Throat.
"He fooled me," said Gray. "It was like I was hit with a tremendous sledgehammer."
Nixon appointed Gray, a former Justice Department official and submarine commander, acting FBI director in May 1972 — just weeks before the Watergate break-in — after the death of J. Edgar Hoover. Gray was forced to step down in April 1973.
Critics alleged he tried to thwart the Watergate investigation — a charge he denied — even as Felt was secretly feeding information to Washington Post reporter Bob Woodward.
When Felt was unmasked as Woodward's source more than 30 years later, Gray said he believed the trusted deputy had been unhappy at being passed over for the top job and had talked to the Post in order to sabotage him.
"I think there was a sense of revenge in his heart, and a sense of dumping my candidacy, if you will," he told ABC.
Gray was never indicted for any Watergate-related misdeeds, but descriptions of him as a Nixon loyalist who helped thwart the investigation and as someone the White House thought could be pushed around dogged him in the years following the scandal. He vigorously disputed the depiction.
"He still will go down in history as somebody who took the bidding of the White House rather than following the law," Elizabeth Holtzman, a member of the House Judiciary Committee during the Watergate hearings, told CBS Radio News.
That disclosure provoked Nixon domestic policy adviser John D. Ehrlichman to utter his famous phrase that Gray would be left to "twist slowly, slowly in the wind."
In the ABC interview, Gray defended his cooperation with the White House. He said he burned files from the safe of E. Howard Hunt, a member of the White House "plumbers," in his home fireplace because he had been ordered to do so and the files were unrelated to Watergate.
"He was told by the White House to destroy documents, and he did," said Holtzman.
He said he provided internal FBI files to the White House only after he had been cleared to do so by the bureau's general counsel.
Gray also said he refused White House demands to fire Felt or order a lie-detector test because he trusted the man so completely that he put him in charge of investigating FBI leaks.
Ed Gray said his father "certainly was not in cahoots with Nixon. His entire purpose all the time was to get to the bottom of it."
Gray was working on compiling his files from Watergate when he died, and his son said the family plans to release a book that will "counter many of the flat falsehoods" made against him.
"There aren't any heroes in Watergate. But I think what you'll find as you learn about my father is that apart from the outside investigators and independent prosecutors, he was the only wholly honest one," his son said.
Born in St. Louis in 1916, Gray left Rice University in 1936 to enter the U.S. Naval Academy. He graduated from the academy in 1940 and was commissioned as a line officer.
Gray served aboard submarines in World War II and the Korean War during a 20-year career in the Navy. He earned a law degree in 1949 from George Washington University.
Gray returned to government service after Nixon was elected president in 1968, serving as executive assistant to the secretary of Health, Education and Welfare and on the president's Cabinet committee on desegregation. He was awaiting Senate confirmation as deputy attorney general when Hoover died and Nixon asked him to lead the FBI.
His nomination to permanently head the agency was withdrawn when he resigned.
In their 1974 book, "All the President's Men," Woodward and Carl Bernstein said Deep Throat suggested Gray had blackmailed Nixon into nominating him as permanent FBI director out of fear of what might be revealed if Gray were no longer at the agency to "keep the lid on" Watergate.
After he left the FBI, Gray returned to private law practice in New London and Groton, Conn.
He is survived by his wife, Beatrice Kirk Gray, and four sons.