In Walden, Thoreau mentions Congressmen giving away seeds. In a footnote it is said that this was a traditional practice. Is this true? If so, how did it start? How long did it last?
Yes and no. A branch of our Government did gave seeds from 1838-1923 ( though there were not directly from Congress, they were the compliments of a senator or representative, thus "congress"). The Patent Office actually started this program, it was transferred to the Department of Agriculture shortly as it proved way too large a burden for the patent office. It was started because the government realized it had done VERY little to contribute to the agricultural betterment of the country, despite it being one of the main industries of the nation at that time. It was decided that to foster this industry in both farmers and in civilians, this was the best option. They also knew that mass-producing these plants allows for further development of the species and better selective breeding. There was no downside to giving away free seed. However, as the face of the country and those residing within it changed, so did this program. By the 20s, considerably fewer people were planting gardens, mostly due to a change to more city based life with less room to grow things.
Note, that the government still "gives" seeds to people who are very poor...EBT, the new name for Food Stamps, covers seeds and food producing plants, as well as food! It just isn't available to every citizen the way this was.
A good single source can be found here at the governments own website.
Disclaimer: I found this one interesting, so I did my own few hours of research. This means I am not an expert, but I did read several hours worth of things for you.