Robert Gaylord Barnes, 63, a Foreign Service officer for more than 20 years and a former ambassador to Jordan, died Monday at Albert Einstein College of Medicine Hospital in the Bronx, New York. He had been ill for the past several months.

Mr. Barnes was born in Battle Creek, Mich. After his graduation from Princetown University, he studied for a year at Yenching University in Peking, China. He later earned a master's degree at Yale University.

After World War II service in the Army, he joined the State Department. He held various posts in Washington and the NATO headquarters in Paris. In 1959, he was assigned to the U.S. Embassy in Turkey, where he remained until 1964.

That year he was named ambassador to Jordan, a post in which he served until his retirement from government in 1966.

From 1966 to 1973, Mr. Barnes worked for the Mobil Oil Corp., on international affairs. In 1973, he was named to his current position as executive director of the American Arab Association for Commerce and Industry.

He was a member of the board of director's of the Middle East Institute, of the home in Dobbs Ferry, N.Y.; a son, George Emerson Barnes II, of Armonk, N.Y.; a daughter, Jane Newby of Monrocville, Pa.; a sister, Mrs. Robert C. Davis, of Potomac; two brothers, Kendall M. Barnes, of Alexandria, and Dr. Allan C. Barnes, of New York; and four grandchildren.