Gray joined the
North Borneo Civil Service in 1925 as a cadet, and served in various administrative posts. After qualifying in Malay and Law, he went to Canton in 1931 to study Chinese, and was attached to the Secretariat for Chinese Affairs in Hong Kong. The following year, he returned to North Borneo where he was appointed District Officer of
Jesselton, and from 1932 to 1935, he was editor of the
British North Borneo Herald and Official Gazette and superintendent of the Government Printing Office. In 1935, he served as District Officer of
Kudat before he was appointed Government Under Secretary serving from 1935 to 1938, and was then promoted to Government Secretary remaining in the post until 1941 while also serving as ex-officio member of the Legislative Council and High Court judge. From 1941 to 1945, he was interned by the Japanese army as a
POW. acting Financial Secretary (1951–52); Deputy Chief Secretary (1952–1956); representative of North Borneo at the coronation of Elizabeth II in the United Kingdom (1953); Secretary for Local Government, North Borneo, and Chairman of the Board of Education and the Town and Country Planning Board (1956–1961); acting Chief Secretary on occasion (1952–1960);
Officer Administering the Government in 1958 and 1959, and acting
High Commissioner of Brunei in 1959. He retired from service in 1961. == Personal life and death ==