Daniel O'Flaherty, 89, a retired official and research engineer with the Bureau of Public Roads who was active in church organizations, died Saturday at the Woodbine nursing home in Alexandria. He had Parkinson's disease.

He workd for the Bureau of Public Roads for 31 years and retired in 1962 as travel studies chief of its Highway Planning Research Division. Upon retirement from the Bureau, he was given the Commerce Department's Certificate of Service Award.

He was a traffic specialist with Wilbur Smith and Associates, an engineering consulting firm, in Washington for six years before retiring a second time in 1968.

Mr. O'Flaherty was a trustee emeritus of Trinity United Methodist Church in Alexandria and had served on its board for more than 30 years.

He was a member of the American Statistical Association and the American Association of State Highway Engineers. He was a past president of the Anchor Masonic Lodge.

Mr. O'Flaherty was a native of Seven Fountains, Va., and a resident of Alexandria. He was a 1923 graduate of George Washington University, and was principal of elementary and secondary schools in Shenandoah County, Va., before joining the Bureau of Public Roads.

His wife of more than 50 years, Isabel Boyer O'Flaherty, died in 1975. Mr. O'Flaherty's survivors include a son, Daniel Fairfax O'Flaherty, a resident of Alexandria and chief judge of that city's General District Court; a daughter, Barbara Jean Camp of LaJolla, Calif.; two brothers, Lester D., of Washington, and Otis H., of Gaithersburg; a sister, Maude Palmer of Winter Haven, Fla., and five grandchildren.