Up through the 1800's, the Blacksmith was something of a jack-of-all-trades, and could often be the center of a town himself. He made the tools, could often have to do leather or wood work himself as they complimented his efforts, could also be the human and/or horse doctor, and a variety of other duties.
However, the 1880's changed things a great deal for blacksmiths, mostly with the introduction of two elements: steel and drop forging. Steel, created by forceibly injecting air into the metal while molten, was much lighter and, with the right combination of elements, less due to rusting or deterioration than iron.
Drop forging allowed, though the use of a press (powered first by mills, then later in the 19th century by hydraulics and other power sources) to quickly create metal objects through the use of molds. Many tools and parts for guns were made very quickly this way (where before they had to be hand crafted, much more slowly, by individual experts).
The combination of drop forging and steel also allowed for the creation of machinery with which to produce other parts more easily, which lead to mechanization and assembly lines.
Heading into the 20th century, the main use for blacksmiths was shoeing horses and working for railroads. This lead to a split in the profession, with ferriers (smiths who specialized in horse-shoes and other horse related smithing) becoming somewhat more prevalent, while the need for blacksmiths died out in the 20's and 30's with the railroads as cars took over.
In the 60's, a retiring blacksmith realized that he was one of the few, if not only, master blacksmith left in the United States, and started up a school for smiths. Matched with the growing interest in Renaissance and reenactment socities, this has brought back smithing on a national level, though obviously more as a hobby.
Interestingly enough, in much of Eastern Europe and Russia, Blacksmithing remains a very useful and needed skill, as much of the regions there are bereft of useful wood, and must use metal instead, to the degree that they're as common as vechicle mechanics there. There is one American of note (whose name I have only as "Tiny") who is the only American who is a certified Master of Blacksmithing in both Russia and Scottland. However, there is much with smithing, as with many other trade professions, that we have lost a great deal of our knowledge of, and may never recover.
Much of this knowledge I gained from a conversation with a smith at Silver Dollar City, in Branson, MO.