Patent Medicine products, snake oil being one of these, were most definitely a real thing. In fact, a lot of modern day products had their beginnings as patent medicine, Coca-Cola, Dr. Pepper, Aspirin, Vicks, Bitters, and Tonic Water just to name a few.
What's interesting is some of these products really were useful and ended up having huge effects on history, whether for the commercial side as seen by Coke, which dropped its use of cocaine in the ingredients before it became really popular, to the use of quinine in Tonic Water for the expansion of European Imperialism (malaria became less lethal). But, for every successful patent medicine product there existed thousands more that could have had inert ingredients like wood pulp to others that were more deadly containing arsenic or mercury.
While not directly a Patent Medicine, there is a lovely anecdote about Mark Twain being analyzed by a Phrenologist two years in a row. Phrenology being the study of how the bumps on our skull affect our personality and had the same marketing appeal and methods of Patent Medicines. The first year, the Phrenologist didn't know who Mark Twain was and said he was a boring person who lacked an sort of sense of humor. The next year, the Phrenologist knew Mark Twain and his reputation and stated that the bumps on his head represented comic genius.
Mike Follin of the Ohio Historical Society actually performs a modern day recreation of the historic "snake oil salesman" who often traveled from town to town in 19th century America. He performs as a "Dr. Balthasar" who sells Marvelous Miracle Medicine; the character is an amalgamation of historical snake oil salesman he's researched. Video of his performance.
I saw a performance of his show, and it was pretty much exactly as you'd expect. He banters back and forth with the crowd, talks very rapidly, and accuses everyone of variously being cheated by their doctors/pastors/politicians and of having numerous terrible illnesses that can only be cured with his medicine. Follin pointed out once he was out of character that this often wasn't far from the truth since "legitimate" medicine at that time was fairly primitive.
According to questions he answered after the talk, the medicine being sold was usually just some kind of alcohol, which of course makes you feel good if you drink it. Follin also said that the "medicine" had a placebo effect, contributing to the success of salesmen. Besides selling medicine, these shows were an important source of entertainment and news for people on the frontier, who spent most of their time working extremely hard in very, very remote places.
This cliché is MUCH older than the Old West, it features in Ben Johnson's 1606 play Volpone. The 'mountebank' in Act 2 scene 2 is an Italian Renaissance version of a snake-oil-sales-man who travels from place to place selling dodgy medicines. One character is duped by him and the other isn't so it's very clear that Johnson is writing about this specific character-type.
PEREGRINE (PER):
They [mountebacks] are quacksalvers;
Fellows, that live by venting oils and drugs.
SIR POLITICK WOULD-BE [Sir P]:
Was that the character he gave you of them?
PER:
As I remember.
SIR P:
Pity his ignorance.
They are the only knowing men of Europe!
Great general scholars, excellent physicians,
Most admired statesmen, profest favourites,
And cabinet counsellors to the greatest princes;
The only languaged men of all the world!
PER:
And, I have heard, they are most lewd impostors;
Made all of terms and shreds; no less belivers
Of great men's favours, than their own vile med'cines;
Which they will utter upon monstrous oaths:
Selling that drug for two-pence, ere they part,
Which they have valued at twelve crowns before.