Gaming miniatures likely date back as far as civilization. The first set of well known rules for miniature gaming was published by author H.G. Wells as "Little Wars" in 1913.
Although closely related to toy soldiers, gaming miniatures are fundamentally different in that they are designed to be a part of a game rather than an independent object. There certainly is a blurring of lines in that there is no shortage of rules designed for use with toy soldiers, but the defining difference is the intent of the designer. A gaming miniature usually is created with a specific game or family of games in mind where a toy soldier is designed to be displayed by itself or with other similar toys.
The industry of gaming miniatures first got a huge boost in the 1960s with the publication of many famous sets of wargaming rules designed specifically for use with miniatures. A second huge boost was the advent of Dungeons and Dragons in the 1970s and 1980s. The use of gaming miniatures, while optional, quickly became a standard "add-on" feature of roleplaying games.
The next massive expansion of the industry came when Games Workshop introduced Warhammer and created a series of rules and miniature models designed to be sold together. Unlike D&D, Warhammer *requires* the use of miniatures, preferably ones created by Games Workshop.
The 21st century again revolutionized miniature gaming with the arrival of the 3D printer. This enabled enthusiasts to share 3D design files with each other (STL files) or buy printed miniatures from services such as Shapeways. We expect the next revolution to come as color 3D printing becomes practical, enabling hobbyists to print pre-painted pieces.