Genes carry information which is decoded by the organism to perform a specific function or task. DNA is not capable of catalyzing any reaction by itself. For example, in Griffith's experiments the gene responsible for transformation of avirulent bacteria into virulent, disease-causing bacteria in some way carried information to convert this bacterium into a pathogen.
Genes carry information for a number of different functions.
The function that is most typically thought of is that of encoding proteins . Other genes encode specific RNA molecules which are not translated into proteins but perform other functions within the cell. Some of the DNA in the genome is used to make sure that gene expression is correctly regulated . And, especially in many eukaryotes, there is lots of DNA whose function we know nothing about. In summary, DNA encodes proteins, RNA molecules and regulatory information.