First, some clarification: Ninetales is commonly called a "kitsune," which is the Japanese word for fox. This is accurate in the sense that Ninetales is in fact a fox, but when used in English the word kitsune refers to the foxes of Japanese folklore and myth. Foxes are a common motif in Japanese folklore, and there are many different types; simply saying that Ninetales is a kitsune and leaving it at that would be like neglecting to mention it has nine tails. The specific name for the nine-tailed fox is kyuubi-no-kitsune.
In Japanese folklore, a beautiful woman, Tamamo-no-mae, is a courtesan who causes Emperor Konoe to become very ill. Tamamo-no-mae turns out to be a good or evil nine-tailed fox (depending on the story) working for a feudal lord in a plot to usurp the throne. After she's found out, the Emperor orders his most powerful warriors after her, but she eludes them. Tamamo-mo-mae comes to one of them in a dream and begs for its life, prophesizing that one of the warriors will kill her the next day; the warrior refuses and the prophecy comes true. The kitsune turns into a sesshoseki, a stone that releases poisonous gas and kills anyone who comes near, and thus she haunted the stone for many years. Eventually, a Buddhist priest cleanses the stone and convinces her spirit to give it up, and she relents.
This is just one of many stories surrounding the nine-tailed fox. It also appears in Chinese and Korean folklore, sometimes as a benevolent creature and a sign of good fortune, other times malicious and evil. Ninetales's Pokédex entries keep in line with these traditions by making it a creature that lives for many years and a holder of mystical powers.
Ninetales isn't the only entity to take inspiration from nine-tailed foxes — they've been used as the inspiration for many other characters over the years. In particular, the nine-tailed fox is a major entity in the anime/manga Naruto (given what little I know of it).