Aikido and judo both developed from old styles of jujitsu with aikido based largely on Daitoryu Aikijujitsu. Judo is based largely on Kitoryu Jujitsu; Jigoro Kano modernised the old styles of jujitsu using his judo principles.
Technically, aikido is based on atemi waza (striking techniques) and kansetsu waza (joint techniques) where the two participants are separated. Judo is based on nage waza (throwing techniques) and katame waza (holding techniques) where the participants are at grappling distance and is retained in the judo randori system.
For more detailed information see the following pages: History of Aikido, The Development of Aikido and Organisation of Aikido.