William Robertson qualified as Bachelor of Medicine (MB) and Master of Surgery (CM) at Glasgow in 1877 and worked as a surgeon at the Throat and Ear Hospital, Newcastle-upon-Tyne, for some time. He then came to the Cape Colony, where he was licensed to practice in June 1879. By 1881 he had settled in Kimberley and late that year became a foundation member of the short-lived Griqualand West Medical Society. However, following a public outcry as a result of the high fees its members charged, and their unwillingness to cooperate with doctors who were not members, Robertson announced his resignation from the society in February 1882. He may have returned to Scotland for some time, as he obtained the degree Doctor of Medicine (MD) at the University of Glasgow in 1883. By April 1884 he resided in Kimberley again and during that month was elected a member of the newly founded South African Medical Association. Although he was not present at the first meeting (held in Cape Town), a paper by him on "Corrosive sublimate as a surgical dressing" was read on his behalf. Later that year another paper by him, "Notes on a case of ulceration of the cornea" was published in the South African Medical Journal (Series 1, 1884, Vol. 1, pp. 109-110). Towards the end of the year the editor mentioned him as one of four regular contributors to the journal during its first year.
Robertson moved to the Witwatersrand and was licensed to practice in the South African Republic (Transvaal) in 1895. In May the next year he became a member of the Transvaal Medical Society and by May 1897 was a member also of the (second) South African Medical Association.
Early in July 1896 "Dr Robertson" - almost certainly William Robertson - became the first local medical practitioner to apply röntgen rays (X-rays) in his medical practice. Röntgen rays were first generated in South Africa by C.H. Perrins* in Johannesburg at this time. A very brief account of his earliest experiments appeared in the Cape Times of 8 July 1896 and reads in part: "A shadowgram was lately taken of the foot of a patient of Dr Robertson, in which a growth of bone had formed, and the results of the experiment has facilitated the operation necessary for its removal". This experiment represents the first known radiological application of röntgen rays on the subcontinent.
In 1907 Robertson resided in Mayville, Durban. By 1926 he was living in Mossel Bay.