Rait was born in 1874 in Narborough, Leicestershire to Scottish parents, although the family moved shortly afterwards to his parents' hometown of Aberdeen. He was educated at the University of Aberdeen, graduating MA in 1894. He then worked briefly as an assistant to the Professor of Logic at the University, publishing his first book, Universities of Aberdeen: A History, in 1895, before being elected to an Exhibition in Modern History at New College, Oxford in 1896. He was awarded First Class Honours, won the Stanhope Prize and was elected a Fellow of the College the same year. He worked as a lecturer at the College for three years, and in 1903 became a tutor.
Glasgow
In 1913, Rait was appointed to the newly created Chair in Scottish History and Literature at the University of Glasgow, funded through the proceeds of the 1911 Scottish Exhibition of National History, Art, and Industry, held in the adjacent Kelvingrove Park. In this role he sought to engage more closely with students than was traditional for academics at the time, inviting students to tea at his home. From 1915–1918 during the First World War, Rait worked at the War Trade Intelligence Department in London, and was appointed a CBE in 1918. In 1919, he was appointed Historiographer Royal of Scotland, also serving for a time as Dean of the Faculty of Arts in the University. He became a prominent figure in the intellectual and cultural life of the city, frequently contributing letters and articles to the Glasgow Herald, often anonymously. In 1929, Rait succeeded Sir Donald MacAlister as Principal of the University. In this role he sought continue the close relationship he had developed with students as a Professor, relocating the Principal's office to the Main Building of the University, where it remains today, making his time more freely available to students and staff, and frequently entertaining guests at the Principal's Lodging. He was an immensely popular figure with students. After being knighted in 1933, he was met on his return from London to Glasgow Central station by hundreds of students and escorted to the University in a carriage drawn by Blues and led by the band of the OTC. The depression of the 1930s had a heavy effect on the University financially and on the Principal's health. In September 1935, he developed a serious illness, during which time he was largely unable to carry out his duties and was deputised at Court by the Rector, Sir Iain Colquhoun. He died at the Principal's Lodging on 25 May 1936.
Rait married Ruth Bridge in 1908, with whom he had two daughters. He was a member of the Athenæum in London, the Glasgow Art Club, the Western Club, Glasgow and the University Club, Edinburgh. His interests included walking, cycling and fishing.