William Galloway was trained as a mining engineer in Germany at the University of Giessen and the Koenichliche Bergakademie at Freiberg, Sachsen, and in England at University College, London. After some time as a junior inspector of mines in western Scotland he settled in south Wales, where he stayed for the rest of his life. From early in his career he gave attention to the causes of explosions in coal mines and in a series of papers in the Proceedings of the Royal Society during 1875 to 1887 argued that coal dust suspended in the air acted to extend such explosions. In addition to studying unforeseen explosions he conducted experiments in specially constructed galleries and produced violent explosions from coal dust alone, without the presence of gas. He also patented a number of safety devices. His views on coal dust explosions were not accepted at the time and he had to resign as inspector owing to conflict with his seniors. However, eventually he was proved right and covering the floors of coal mine tunnels with stone dust was found to vastly reduce the number of explosions. In total he published 21 papers on his research into this problem, and many other papers relating to mining.
Galloway spent some time in South Africa around 1889. In that year he wrote a 51 page report for submission to the parliament of the Cape Colony, Report upon the coal deposits in the Indwe Basin and Stormberg Range of mountains. It included a map (reduced from E.J. Dunn's* map of 1887), two sections in colour, and a plan of Springfontein Coal Mine. A brief further report and plans on the same topic soon followed. This work was continued in 1890 with a report on coal mining operations at, and proposed extensions to, Doornkop Mine in the Indwe Basin of the Eastern Cape. He also looked into the purchase of surface and mineral rights by the Indwe Coal Mining Company. A paper by him on "The South African coal field" was published in the Proceedings of the South Wales Institute of Engineers the same year.
Galloway became a member of the British Association for the Advancement of Science in 1875 and was still a member 30 years later. From 1891 to 1902 he was professor of mining at University College, Cardiff, and also a consulting mining engineer at Cardiff to his death. His publications during these years included Courses of lectures on mining... (Cardiff, 1898-1900) and Great colliery explosions and their means of prevention (London, 1914). He served as president of the South Wales Institute of Civil Engineers in 1912, and was knighted in 1924. His wider scientific interests are indicated by a paper on "The flying fish", which he published in the Reports and Transactions of the Cardiff Naturalists' Society (1892).