Professor Eric Kandel defines genes as self-propagating units that are responsible for the elementary building blocks of cells.
A gene is the unit of heredity. It encodes a messenger RNA, which gives rise to a protein, which is the functional machinery of the cell. So, it is the unit that is responsible for the elementary building blocks of cells, and it is self-propagating - it copies itself, and therefore can be transmitted from generation to generation.