There are several theories related to this expression, with two most prominent attributing it to the actual oil obtained from a water snake and to a certain Native American tribe, respectively.
Some researchers suggest that the name is derived from the actual snake fat extract, brought to USA by the immigrant Chinese who were using it as the basis for the traditional anti-rheumatic medicines. Kunin argues that these products could have been really effective and suggests that the eponymous animal was most likely the Chinese water snake Enchydris chinensis whose fats is rich in aicosapentaenoic and arachidonic acid that, as many other polyunsaturated fatty acids acts as a prostaglandine antagonist, resulting in anti-inflammatory properties and being and omega-3 fatty acid is a notable diet supplement, especially important for people facing inadequate nutrition, not uncommon in 19th century. Although it is debatable, whether this oil has been procured from the aforementioned animal or was adulterated or even completely replaced with common fish oil is not that important, as the oil obtained from most popular fishes is still rich in the omega-3 acids. Thus, as 'snake oil' appeared to be an exotic medicine that seemed to be working, there is a theory that the quacks initially peddled their products under a well-known name of an already popular product.
Another theory, states that the term 'snake oil' might be a bastardized form of the expression 'Seneca oil', after the Native Americans of the Seneca tribe who were said to be using natural oil harvested from the surface seepages as the general antiseptic and a remedy for various skin treatments. The name of Senecas is associated with petroleum mainly due to the fact that the first crude oil in North America has been found in 1627 in the area associated with that nation, although back then this particular territory was held by Wenro tribe that became displaced by the Senecas roughly two decades later (today it is Oil Springs Reservation, NY). This association was also likely the namesake of the Seneca Oil drilling company, founded in Pennsylvania in 1858. Nevertheless, it is quite possible that Senecas were using oil for medical purposes, as there were accounts of the oil usage in America, and the substance itself, although not harmless, especially when ingested, shows strong antiseptic properties when used topically. It is also worth noting, that European traditions of using tar and pitch obtained from plant material to treat skin conditions hails back many centuries, while in the Mediterranean area, usage of mineral oil (naphtha) is mentioned by Dioscorides in his book Περὶ ὕλης ἰατρικῆς written in 1st century AD (also known in Latin translation as De materia medica), where it is described as a good remedy for pain and rashes. This was continued by other ancient and medieval authors, as evidenced by Jacob Meydenbach's Hortus Sanitatis published in Mainz in 1491, a compendium based on earlier medieval natural encyclopedias, where substance called tar, naphtha or natural oil was invariably presented as a remedy for skin conditions, wounds and even dental problems. So, it is very likely that Native Americans noticed the beneficial properties of such a substance, but given that neither the quacks not their clients were well-versed in local history and native linguistics, they could have twisted the term 'Seneca' into 'snake', especially in conjunction with the existence of an actual snake oil as stated above.
With the development of the new, medical products, especially in the late 19th and early 20th century, when the new technological and scientific advancements slowly pushed folk remedies into the realm of dubious quackery (sometimes deservedly, sometimes not) and the name of Senecas became more and more detached from the association with 'rock oil' that, along with its products became more and more commonly called by its technical names like 'petroleum' or 'kerosene', both terms could have been slowly abandoned and as they were still used by the quacks, the only association of the term 'snake oil' that remained was the one with the fake remedies.
Holbrook, S.A., The Golden Age of Quackery. MacMillan & Co., Boston 1959.
Kunin, R.A., Snake oil. in: Western Journal of Medicine, no. 151 (2/1989).
Nuland, S., Medicine, The Art of Healing. Hugh Lauter Levin Associates, Inc., New York 1992.