Henry Anatole Grunwald, editor in chief of Time Inc., resigned yesterday 4 1/2 months earlier than expected and is preparing to take a government position, according to a spokesman for the company.

An administration official said that Grunwald, 64, is expected to be named ambassador to Austria but that the announcement may not be made for several weeks.

"I really can't comment. You must understand," said Grunwald, contacted at his vacation home on Martha's Vineyard.

Grunwald was born in Vienna in 1922 and came to the United States in 1940. He joined the editorial staff of Time magazine in 1945 and became editor in chief of Time Inc. in 1979.

He is a member of the American Austrian Foundation, the Council on Foreign Relations and the American Council on Germany.

Grunwald's retirement was announced earlier this year, but Time spokesman Louis Slovinsky said he resigned now because he "is being considered for a government position" and wanted to avoid the appearance of conflict of interest as head of the magazine and book-publishing company.

If Grunwald is named to represent the United States in his native country, he would replace Ronald S. Lauder, a former executive vice president of Estee Lauder Inc., and son of the cosmetic company chairman, Estee Lauder.

The position of ambassador to Austria is considered particularly sensitive by the Reagan administration because of the U.S. order barring Austrian President Kurt Waldheim from entering the United States.

The Justice Department decided last April to bar Waldheim, citing evidence that the former secretary general of the United Nations aided in deportation and execution of thousands of Jews and partisans while serving as a German army lieutenant in the Balkans during World War II.

Jason McManus, former managing editor of Time magazine, replaces Grunwald as editor in chief, effective immediately, Slovinsky said.

Grunwald, who will reach the mandatory retirement age of 65 Dec. 3, will continue as a director of Time Inc. and serve as a consultant to the company, the spokesman said. McManus, 53, is to replace Grunwald as a director at year's end.

Time Inc. includes Time, Sports Illustrated, Fortune, Money, People and Life magazines and Time-Life Books and claims a global circulation of almost 17 million.