So... we've had an excellent explanation of the meaning of the phrase as well as the usual exoteric synthesis of complex information distilled to it's clear understandability re: moose/meese, a goose/geese, sans mon, from the inveterate Q. However, mysteriously, His Inveterateness and auntflo failed to answer the question as to origin(s)...
The phrase is a Probverb; as stated, this proverb is based on the fact that a horse's value is determined by his age, which, in turn, can be roughly determined by an examination of his teeth. The message conveyed is that a gift should be appreciated for the thought and spirit behind it, not according to its value. St. Jerome, (ca. AD400) who never accepted payment for his writings, first used the phrase in reply to his literary critics. His exact words: "Never inspect the teeth of a gift horse." (Source: Trivia-Source).