Historically, the word druid generally refers to Celtic religious figures, but most of our legends around druids come through Roman conquerors and Greek historians who studied them. Most of the original legends were transmitted orally and corrupted (sometimes deliberately) by the Greeks and Romans who wrote about them. Exceptionally little of the original myths survives because the Celts of that period did not place a heavy emphasis on writing and much of what little was written by first party sources was destroyed. The word itself entered English from Latin. (Yes, there are some later historical Irish myths that grew up around druids, but many of those formed after the Romans largely exterminated the original druids and suppressed much of the oral history that the druids themselves were largely responsible for transmitting.)
With that noted, some historical legends do associate druids, or at least groups associated with druids with shapeshifting. The Gallizenae, which are arguably a specific group of druids, were associated with shapeshifting. Some Irish myths, which largely were developed after the original historical druids around which the myths grew had been effectively exterminated, discuss druids turning both themselves and others into animals. While animal transformations definitely appear in the old stories, druids were more associated with augury and were strongly associated with advisory positions. They were also strongly associated with Bards, in the old pre-D&D meaning of that word where they were associated with poetry, storytelling and entertainment, but also with the spreading of news.
If we look at modern literature, The Iron Druid Chronicles centers on druids and shapeshifting is one of their canonical powers. While this was written after the early versions of D&D and thus could not have possibly inspired them, Kevin Herne takes pains to reflect what is known of the original Celtic myths.
Now, for the direct connection to what inspired the designers of D&D, I have not found an interview that discusses it. However, it is likely they were inspired by the old myths or the Roman and Greek corruptions of them in which animal transformation did feature. I think it is safe to assume that later fictional appearances of druids, with certain exceptions for authors like Kevin Herne that do extensive historical research, are often largely inspired by D&D, which has now successfully suffused the culture.