As with most Halloween traditions, several came from the Celts and their celebration of Samhain. The black cat that we love and celebrate today also has his roots in these ancient traditions.
Cait Sidhe (pronounced Kate Shee) is known to be a mischievous, magical member of the faerie. The Fairy King of Cats was said to be a large black cat, often with a patch of white on his chest. On the night of Samhain, you should leave a saucer of milk out for the Fairy King of Cats. If you do, your house will be blessed. If you don't, your cows' milk will dry up for the next year.
As for their association with witches, well, that didn't come around until Pope Gregory IX declared black cats to be workers of Satan in 1233 CE. The Pope claimed that the devil gifted black cats to witches in order to help them with their work, and from there, the superstitions only grew.
In the 1700s, the Puritans believed that witches could shape shift into black cats to spy on their neighbors and pass along spells and curses. This of course isn't true, but many black cats were hunted simply because of the color of their fur coats. These ideas go back to the ancient festival of Samhain, where Druids, those people who have been typified as "witches" by their Christian neighbors, celebrated Cait Sidhe, thus bringing black cats and witches together for our modern-day Halloween celebrations.
Pictured below is Vincent, our Fairy King of Cats.