They both come from the same culture even though they are both from different times. However judo comes juijitsu which comes from the ancient Samurai. While it is often said that the ninja came from the Samurai. Of course saying the ninja come from the Samurai has been debated but no one really knows for sure since the ninja were secretive to begin with (mainly because the work they did required them to be secretive)
However it is recorded that the Koga ninja did help the Samurai pass through their area so they could escape the shogun.
Now the outfits and clothing they wore is a bit different but in some ways similar. The ninja wore stuff like this: www.authenticninjaclothing.com
While the judoka wears uniforms like this:
For a little fun I added this youtube video of a ninjitsu practitioner and a judoka squaring off:
For more ninja stuff try this page http://en.wikipedia.org/wiki/Taijutsu