You seem to have some confusion, so let's clear things up.
A gene is a stretch of DNA (or RNA) that codes for a polypeptide (protein), that is a series of aminoacids bound together.
Each gene consists of nucleotides bound together, which are interpreted by the cellular machinery in groups of three, called triplets.
DNA is first transcribed into messenger RNA (mRNA), which is then translated into proteins.
Each triplet codes for one aminoacid not one gene! In fact genes are not "coded" by anything, they are the code!
Now, what I just wrote is extremely simplified, there are other important details that I omitted, but hopefully it cleared your doubt.
To give you some further detail: not every single nucleotide in a gene will code for an aminoacid. There are regulatory elements such as the promoter of the gene, which allows the enzymes that transcribe the DNA to attach to the gene (essentialy it says: "hey, start transcription right here!"). Similarly, enhancers and silencers can tune up or down transcription of the gene.
In eukaryotes there are big stretches of DNA called introns that are not coding for anything but have big importance for regulating transcription. In fact a single mRNA can be used to code more than one protein, using a process called alternative splicing.
There are also regions of DNA that code for RNA sequences not translated into proteins at all, but which have all sorts of regulatory functions in the cell.