I tried to answer a similar question in the chat. It is a type of chicken and egg problem. When cells divide, the genes are duplicated and then distributed to the daughter cells so that each one has all genes and so one. In evolution, it probably started with one gene, but we do not know which one it was.
Before DNA was know, people knew from breeding of fruit flies that genes must exist that control the way flies look like. After DNA was discovered as the genetic material, people were able to determine the sequence of single genes. Now we can determine all genes of one species in a day.
Comments