Born in Wellington, New Zealand, on 24 March 1865, Louis Edward Barnett was the fourth of seven children of Alfred Abram Barnett, an auctioneer of Jewish extraction, and his wife, Julia Joshua. He attended Thorndon School, and from 1879 Wellington College where he was a member of the cricket XI, which he captained for four seasons, and the rugby XV, which he captained for a year. He left in 1882 with a university Junior Scholarship.
Barnett attended the University of Otago Medical School from 1883 to 1884 then travelled to Scotland, where he attended the University of Edinburgh School of Medicine from 1886 and graduated MB, CM with first-class honours in 1888. He was a house surgeon at Middlesex Hospital, and in 1890 was the first New Zealander to become a fellow of the Royal College of Surgeons of England.
After returning to New Zealand in 1891, Barnett obtained a locum surgical appointment to Dunedin Hospital, and a temporary lectureship in surgery at the medical school. He was committed to the aseptic principles which had begun to succeed Lister's antisepsis and at first his use of mask and gloves in the operating theatre raised a number of eyebrows. In 1892 he served as locum for Daniel Colquhoun with an appointment as physician and lecturer in medicine. On 31 December that year, at West Taieri, he married Mabel Violet Fulton, the daughter of pioneer Taieri settler James Fulton, MLC, and his wife, Catherine Henrietta Elliot Valpy, a leading temperance worker and suffragist. The couple were to have five children.
In 1894 Barnett was appointed to a full lectureship and became professor of surgery in 1909. From 1893 to 1900 he was also editor of the New Zealand Medical Journal and in 1907 he was president of the New Zealand Branch of the British Medical Association. He occupied the chair until 1924, except for a period of overseas service during the First World War when he was consulting surgeon to the New Zealand Expeditionary Force, with the rank of lieutenant colonel. His contribution was recognised when he was appointed CMG in 1918.
Barnett's concern with surgical standards prompted him to put forward a proposal to the meeting of the New Zealand Branch of the British Medical Association in Dunedin in February 1920 that an association of New Zealand surgeons be established. His thinking had been influenced by the aspirations of the American College of Surgeons, founded seven years before, of which he became an honorary fellow in 1926, but his own concept soon broadened to encompass Australasia. The expanded proposal was presented on his behalf to the Australasian Medical Congress in Brisbane in August 1920, which he could not attend. Here, however, it had a chilly reception, and it was not until 1926 that it was resolved to establish the College of Surgeons of Australasia (later the Royal Australasian College of Surgeons). The founders met in Dunedin in February 1927, during a meeting of the Australasian Medical Congress, of which Barnett was president, and elected the first council with Sir George Syme as president and Barnett as one of two vice presidents. In the same year he was made knight bachelor. He was president of the college from 1937 to 1939.
Hydatid disease was a subject which concerned Barnett over many years. After visiting Félix Dévé, a professor of medicine and authority on hydatid parasitology at Rouen, France, in 1926, he became active in promoting research within his own university and in establishing the hydatid registry of the College of Surgeons. He was also much involved in the work of the New Zealand Branch of the British Empire Cancer Campaign Society in Otago, and in fostering the development of the St John Ambulance Brigade in Dunedin, where a division had been founded in 1892. He was made a Knight of Grace of the Order of St John.
Louis Barnett was a notable but unassuming benefactor. When he retired in 1924 he endowed £8,000 to the University of Otago Medical School to establish the Ralph Barnett chair of surgery, in memory of his son who was killed in action in the First World War. He also gave generously to the faculty library and to the development of a university sports ground at Logan Park. In 1936 he and two of his brothers presented a lamp of remembrance to Wellington College. Louis Barnett died in Dunedin on 27 October 1946, survived by his wife and four children. He was remembered as a cheerful, charitable and humble person and a prime mover in the establishment of the Royal Australasian College of Surgeons.