Charles J. Gray was educated at Bradford Technical College and graduated at the Royal School of Mines, London, in 1894. He became an associate of that institution (ARSM) and was briefly employed there as a demonstrator in mining. In September 1895 he came to Natal to take up a position in the Department of Agriculture as deputy commissioner and inspector of mines, Nqutu District, as well as government assayer for Zululand. He became justice of the peace for the Nqutu District in November 1896. In 1898 he was promoted to commissioner of mines for Natal, a post that had just been created. In May that same year he was appointed a member of the Mining Laws Revision Committee. The next year he married Edith E. McLeod, with whom he had at least two children.
In July 1901 Gray became chairman of the Board of Examiners for Mine Managers' Certificates and in February 1904 chairman of the Coal Testing Committee. After the formation of the Union of South Africa in 1910 he was appointed acting deputy inspector of mines for the Pretoria district, and then deputy inspector of mines, serving in Krugersdorp from November 1911 to 1917. Having been promoted to inspector of mines in 1915 he was transferred to Johannesburg from 1917 to 1930. In the latter year he became chief inspector of mines for the Union of South Africa, a position he held until his retirement.
In addition to his regular Report on the mining industry of Natal (1898-1909) Gray published a number of scientific papers, including: "Natal gold: Government prospecting work near Stanger" (Natal Agricultural Journal, 1906, Vol. 9, pp. 516-521); "Geological notes on the coal and gold deposits in Natal" (Report of the South African Association for the Advancement of Science, 1907, pp. 58-70); "Relation of falls of roof in collieries on the Middelburg coalfield to weather changes" (Journal of the Chemical, Metallurgical and Mining Society of South Africa, 1913/4, Vol. 14, pp. 395-401); and "A new method of using physical characteristics of minerals for their identification" (Transactions of the Geological Society of South Africa, 1920, Vol. 23, pp. 114-117). In 1910 he issued a Geological map of Natal on a scale of 20 miles to the inch (1:1 267 200), based on the work of W. Anderson*, F.H. Hatch*, G.A.F. Molengraaff* and others. He was furthermore the author of the Report of the Witwatersrand Rock Burst Committee (Cape Town, 1925).
Gray was a Fellow of the Geological Society of London. He was a member of the South African Association for the Advancement of Science (from 1907); the South African Philosophical Society (from 1899) and its successor, the Royal Society of South Africa (from 1908); the British Association for the Advancement of Science (from 1905); and the Chemical, Metallurgical and Mining Society of South Africa, serving as president of the latter in 1924/5. In his presidential address he discussed the problem of rock bursts, which led to intensive research on rock mechanics, including a paper by him in the Journal of the society in 1932. He joined the Geological Society of South Africa in 1918, served on its council from 1919 to 1938, as honorary secretary-editor during 1929-1932, and as president in 1922. His presidential address, "The utilitarian value of geological investigations illustrated by the geology of South African coals" was published in the Proceedings of the Geological Society of South Africa (1923, Vol. 26, pp. 19-33). He was also a member of the (British) Society of Arts, an honorary member of the (British) Institute of Mining Engineers, and a trustee of the Natal Museum. His papers and correspondence during the years 1903-1938 are in the National Archives Repository, Pretoria.