Thomas Frederick Dunhill (1 February 1877 – 13 March 1946) was born in Hampstead, London, the fourth of five children of Henry Dunhill (1842–1901) and his wife Jane, née Styles (1843–1922). Henry Dunhill was a manufacturer of sacks, tarpaulin and ropes; Jane Dunhill ran a small music shop. Their eldest son, Alfred later founded a tobacco company that bears his name. Thomas was educated at the North London High School for Boys, and when the family moved to Kent, at Kent College, Canterbury.
In 1893 Dunhill entered the Royal College of Music studying the piano with Franklin Taylor, counterpoint with James Higgs and W. S. Rockstro, and harmony with Walter Parratt In 1894 he began studying composition under Charles Villiers Stanford, whose pupil he remained after leaving the college, studying with him until 1901. In 1899 he was the first winner of the Tagore Gold Medal, awarded to the College's outstanding students.
From 1899 to 1908 Dunhill was assistant music master at Eton. From 1905 he was also on the staff of the Royal College of Music as professor of harmony and counterpoint. He began a career as an examiner for the Associated Board of the Royal Schools of Music, working in Britain and throughout much of the British Empire.
Dunhill was a stalwart of organisations dedicated to the welfare of his fellow musicians: these included the Performing Rights Society and the Musicians' Benevolent Fund. He was a director of the Royal Philharmonic Society and Dean of the Faculty of Music at the University of London. He was in steady demand as musical examiner, lecturer, and adjudicator, and returned to teaching, first at the Royal College, taking the chamber music class, and later at Eton, where he returned during the Second World War.