Origin:
When you get a tip for a horse race, the tip is better as nearer it is to the horse e.g. the jockey or the trainer. When you got it straight from the horse's mouth, you have it directly from the source.
This tip is foolproof, I got it (straight) from the horse's mouth!
A small piece of information. Derived from the word ken, used often in the scottish language and is synonymous with knowledge.
Person 1: "Hey I don't get this shit. How do you solve this problem?"
Person 2: "I got that one. Give me some kenlets on this assignment and I'll help you w/ that one."