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 must be taken as a whole to define traits. The colloquial usage of the term gene often refers to the scientific concept of an allele.
The notion of a gene has evolved with the science of genetics, which began when Gregor Mendel noticed that biological variations were only inherited from parent organisms as specific, discrete traits. For example, if one parent has blue eyes and the other has brown eyes, there is a 3/4 chance that the child will have brown eyes. The biological entity responsible for defining eye color was termed a "gene", but the biological basis for inheritance remained unknown until the discovery of the genetic code in mid 1950s, when genes were determined to be encoded by DNA. All organisms have many genes corresponding to many different biological traits, some of which are immediately visible, such as eye color or number of limbs, and some of which are not, such as blood type or increased risk for certain diseases, or the thousands of basic biochemical processes which comprise life.
In cells, a gene is a portion of an organism's DNA which contains both "coding" sequences that determine what the gene does, and "non-coding" sequences that determine when the gene is active (expressed.) When a gene is active, the coding and non-coding sequences are copied in a process called transcription, producing an RNA copy of the gene's information. This piece of RNA can then direct the synthesis of proteins via the genetic code. In other cases, the RNA is used directly, for example as part of the ribosome. The RNA may undergo special post-transcriptional processing steps required to convert it into a mature, functional form. These molecules resulting from gene expression, whether RNA or protein, are known as gene products, and are responsible for the development and functioning of all living things.