Huntington Cairns, 80, an author, editor and retired official of the National Gallery of Art, died of pneumonia Jan. 19 at a nursing home here. He had lived in Kitty Hawk, N.C., since 1966.

For two decades prior to his retirement in 1966, he served as secretary, treasurer and general counsel of the National Gallery of Art. He also produced four volumes on paintings housed in the National Gallery. He was the author of "The Limits of Art," which The New York Times called "perhaps the best anthology of this, or any other, generation."

He knew many writers of his generation. One was H.L. Mencken, who Mr. Cairns celebrated in his book: "H.L. Mencken -- The American Scene." Another was Robert Frost, who honored Mr. Cairns and his wife, Florence, by dedicating a poem -- "Kitty Hawk" -- in their honor.

Mr. Cairns was a native of Baltimore. On the advice of Mencken, Cairns went directly from high school to the University of Maryland Law School, graduating when he was only 20. Before joining the National Gallery, he was a special legal adviser to the Treasury Department where he was called upon to determine whether books and works of art were pornographic or artistic.

"Someone had to do it," he explained. "Most of the customs people didn't know a Vatican mural from a French post card. I was once shown a book which a customs man regarded as highly suspicious. It was a Spanish version of the Bible," he said.

In addition to his work on Mencken, he was the author of "Legal Philosophy From Plato to Hegel." In 1962, he wrote "Law and Its Premises," the 20th annual Benjamin N. Cardozo lecture delivered before the New York Bar Association.

In 1940, he founded and served as moderator for the network radio program "Invitation to Learning."

In 1974, he published his observations and impressions of North Carolina in "This Other Eden."

Although he seldom left Kitty Hawk after the 1960s, his advice and companionship was sought by authors and scholars who visited Kitty Hawk. His correspondents included Aldous Huxley and Bertrand Russell.

Mr. Cairns once observed that Plato had dominated the first part of his life and Shakespeare the second. His last published work was "Shakespeare's Herbs in the Elizabethan Gardens of North Carolina."

From 1943 to 1946 he was secretary of the American Commission for Protection and Salvage of Artistic and Historic Monuments in the War Area. He was a recipient of the Rockefeller Public Service Award. He had served on the administrative committee of Dumbarton Oaks and was a member of the Cosmos Club.