A gene is a segment of DNA that codes for a specific trait or characteristic such as eye color or height. An allele is a variant of a gene that meaning it can have different variations of the same trait such as brown eyes or blue eyes.