Horse racing is a pastime that dates back to Britain in the 12th century, and it’s especially popular with punters/people who place bets. To increase their chances of winning wagers, punters usually share tips about the horses’ traits. The most trusted tips are those from people like horse trainers and stable lads, because they are closest to the horses. Such tips were said to be “straight from the horse’s mouth” because the tipsters had a direct connection to the horse.
Today, that expression is commonly used to indicate that certain information is to be trusted because it comes from the person or entity best placed to know the facts.