Dr. Walter G. (Gary) Schweitzer, 58, a physicist who was a retired official of the National Bureau of Standards and was active in education groups in Montgomery County, died of leukemia Dec. 11 in Johns Hopkins Hospital in Baltimore. He lived in Rockville.

Dr. Schweitzer was a physicist and administrator with the NBS for 31 years before retiring in 1981. His last post was assistant to the director of a Bureau Center. From 1974 to 1975, he had been a Commerce Department science and technology fellow, working with the Senate Commerce Committee's science and technology subcommittee.

During his years with the government, he worked on projects dealing with wave length measurement and laser beams. He was a fellow of the Optical Society of America and member of the American Physical Society. He held awards for his work from both government and scientific organizations.

After leaving the government, Dr. Schweitzer taught physics for a time at Montgomery College.

From 1966 to 1968, he was president of the Montgomery County Council of Parent-Teacher Associations, and was vice president of the Maryland Congress of Parents and Teachers from 1972 to 1973. He served on the Montgomery County Schools' salary advisory committee in 1967. He was a founder of the Committee for the Public Schools.

Dr. Schweitzer was born in Toledo, Ohio, and moved to Washington at an early age. He was a graduate of Coolidge High School and American University, and received a master's degree at the University of Michigan. He earned a doctorate in physics at the University of Maryland.

He had been a member of Zion Lutheran Church in Takoma Park since 1955, and served as its treasurer, a trustee, and member of the church council.

Survivors include his wife of 32 years, the former Margaret Frostic, of Rockville; a daughter, Elaine McGee of Reston; two sons, Karl, of Boston, and Peter, of Lawrence, Kan.; his parents, Mr. and Mrs. Walter G. Schweitzer of Washington; two sisters, June Schaeffer of Kensington, and Phyllis Tanski of Rockville, and two brothers, Britt, of Morgan Hill, Calif., and Donnell, of Bowie.