Willow is the outstanding test case for whether pre-modern plant reasoning ever arrived at a real drug, and the answer is a qualified yes.
Willow bark contains salicin, a glycoside which the body converts to salicylic acid, an anti-inflammatory and antipyretic. The traditional use of willow bark against fever and pain therefore worked, in a modest way, for the reason the tradition could not have known. Salicin was isolated in 1828 and named for the genus Salix. Salicylic acid itself is harsh on the stomach; the acetylated derivative, acetylsalicylic acid, was developed at Bayer in the 1890s and marketed as aspirin from 1899. Meadowsweet, formerly Spiraea, contributed the spir in the name and contains related compounds.
The chain from willow bark to aspirin is real and is often told as a triumph of folk knowledge. Two qualifications are owed. First, the concentration of salicin in bark is low and variable, so the traditional decoction was a weak and unreliable version of what the isolated compound does. Second, the reasoning that led people to willow was not the reasoning that turned out to be right.
That second point deserves the emphasis. The stated Renaissance ground for using willow against fevers and agues was that the tree grows in wet, cold places and so must counter hot, wet conditions, a doctrine-of-signatures argument about habitat. It is a false theory. It happened to point at a tree that contained an analgesic. One success across a very large number of attempts is what chance looks like, and it is not evidence for the method.