Deoxyribonucleic acid (DNA) is the building block of life. It is the blueprint for a living organism and encodes amino acids for polypeptides which form proteins, which, when properly sequenced, form cellular pathways that together form the physical structure and anatomical characteristics of an organic lifeform.
If DNA is changed in some way, the host organism responds to the change by re-making itself in the form specified by the new DNA, often extremely rapidly. Semi-corporeal beings such as the Founders also had DNA, though there is no evidence they had any cellular structure or indeed any cells.
In 2367, Ishara Yar offered to have her DNA tested as a means of proving that she was Lieutenant Natasha Yar's sister. The test was administered by Doctor Beverly Crusher and proved that her claim was true. (TNG: "Legacy")
In 2369, when Lieutenant Reginald Barclay was exposed to a high-energy plasma field in a transporter field, Doctor Beverly Crusher wanted to examine him using a base pair correlation to see if there was any sign of breakdown in his DNA. (TNG: "Realm of Fear")
That same year, following clues developed by his mentor, Richard Galen, Jean-Luc Picard discovered evidence that an ancient race of humanoids had seeded many planets with their DNA billions of years earlier. The evidence suggested that Humans, Romulans, Klingons, Cardassians, and others may have far more in common than previously believed. (TNG: "The Chase")
DNA extracted from a male could be used to impregnate a female. In 2372, Seska claimed she impregnated herself with DNA she had stolen from Commander Chakotay while he was her prisoner. (VOY: "Maneuvers")
Each cell of the DNA of a member of Species 8472 contained more than one hundred times the DNA of a Human cell, making them the most densely coded lifeform that The Doctor had ever seen. (VOY: "Scorpion")
In 2375, Commander Valerie Archer (secretly a member of Species 8472 in disguise) shared a kiss with Commander Chakotay to obtain his DNA, which she was then able to analyze to prove that he was Human. (VOY: "In the Flesh")
As DNA research was relatively new in the 1960s (DNA structure was first established in 1953 with the first notable DNA sequencing research conducted in 1973), Star Trek: The Original Series has no mention of this rather significant piece of medical science, even though DNA would have been well known in the 2260s according to Star Trek canon. It is also for this reason that Original Series episodes depended on other medical methods, whereas DNA samples would have been the preferred choice. Such examples include the voice print identification of Kodos, seen in TOS: "The Conscience of the King", and a reference to "medical plates" during the examination of Peter Kirk in TOS: "Operation -- Annihilate!".