Born on the Ribbingsberg manor in Västergötland in west Sweden, Leonard Gyllenhaal was son of an army officer and belonged to a family of the lower nobility. He went to school (Skara trivialskola) in the cathedral town of Skara together with, among others, the future poet Johan Henrik Kellgren, and later renowned naturalists Anders Dahl and the brothers Adam and Johan Afzelius, with whom he went on natural excursions. Like some of his friends he went to Uppsala to study under Linnaeus in 1769. He never matriculated and remained in Uppsala only one semester, before switching to a military career in accordance with the wishes and traditions of the family, enrolling in the Adelsfanan ("Banner of Nobles") cavalry regiment, and a few years later transferring to the drabantkåren (Garde du Corps). Gyllenhaal, however, remained in contact with Linnaeus through an extensive correspondence and continued to work as an amateur naturalist.
He remained in military service until 1799, when he retired with the rank of major. As this did not take all of his time – different detachments of the Garde du Corps served at the royal court for only brief periods each year – he worked on his father's estate Höberg in Norra Vånga parish in Västergötland, which he managed on his own from 1784. He developed the estate, experimenting with new crops such as the American maize.
His main interest ever since youth was entomology, and already in 1775 he had collected some 1300 largely unidentified beetle species from the western part of Götaland. He built a private entomological museum, library and study on Höberg which he called the "Fly house". At his death, he had a collection of 400 boxes of prepared and identified insects, which he left to the Royal Swedish Society of Sciences in Uppsala (later deposited at the Uppsala University Museum of Zoology). His main publication was the Insecta Suecica, describing the insects of Sweden, which took him 30 years to complete and was awarded the gold medal of the Academy of Sciences. Another claim to fame for Gyllenhaal is the fact that he named the common beetle family of Histeridae. He was also elected an honorary member of the French Société entomologique. He was appointed a Knight of the Royal Order of Vasa.
Leonard Gyllenhaal was a leading Swedenborgian who supported the printing and spreading of Swedenborg's writings. His grandson, the Swedish-American journalist Anders Leonard Gyllenhaal, retained the faith of his grandfather and was a member of the Swedenborgian New Church. His descendants in the American branch of the family include the actor siblings Jake and Maggie Gyllenhaal.
- Olle Franzén, "Gyllenhaal, Leonard", Svenskt biografiskt lexikon, Vol. 17, pp. 558–561.
- Olle Franzén, "Leonard Gyllenhaal", a complete translation of the SBL article, without the references, but with pictures of the Höberg manor house and the "fly house".
- Biographies of Leonard and other members of the Gyllenhaal family in the Nordisk familjebok, 2nd ed., Vol. 10 (1909) (on Projekt Runeberg).
- Biographies of Leonard and other members of the Gyllenhaal family in Svenskt biografiskt handlexikon, vol. 1 (1906) (on Projekt Runeberg).