A gene is the basic unit of heredity in a living organism.
The field of genetics predates modern molecular biology, but it is now known that all living things depend on DNA to pass on their traits to offspring. Loosely speaking, a gene is a segment of genomic information that, taken as a whole, specifies a trait. The colloquial usage of the term gene often refers to the scientific concept of an allele.
Wikipedia