The Gatty Marine Laboratory was opened in 1896 and has been continuously occupied except for the period between 1931 and the end of World War II. The laboratory has its origins in the government-funded St Andrews Fisheries Laboratory, which was founded in 1884. The first director, Professor William Carmichael McIntosh FRS, conducted pioneering work on the taxonomy of annelids and the early life histories of marine fish over more than 50 years. In 1945-46 the Gatty received an operating budget of £50 and was used as a field station by zoologists and botanists based in the Bute Medical Building in the town centre.
Since 1987, the "Gatty" (as it is informally known) has been a component Research Institute of the School of Biology (although the name and composition of the School has changed several times). The laboratory built up strong research groupings in fish biology and marine ecology and by the early 1990s received the highest number of research grants in marine biology of any UK department. In 1997, a major £4.3 million extension to the building was financed by the University Court. The new building provided a modern lecture theatre and teaching laboratory, and research laboratories for immunological and muscle research. The major part of the new build was occupied by the Natural Environment Research Council (NERC) sponsored Sea Mammal Research Unit, which transferred to the site from Cambridge in 1996.