This words of wisdom is known in many languages. What it wants to point out is that when you receive a gift (whatever it is), you should accept it without thinking about its value.
It uses the image of the horse because in the past there was this habit of checking the horse’s tooth to learn more about their health condition.