The different versions of the same gene are called alleles. It is alleles that are dominant or recessive. Which one usually depends on whether the uncommon allele is a "gain of function" or a "loss of function" mutation.
Like if you have two copies of a gene that codes for an enzyme protein, and one copy is normal but the other one has a mutation that makes the enzyme nonfunctional. Both copies are actively used inside the cell to make the proteins, just half of the proteins end up floating there doing nothing until they get old and recycled. The other half, made by the good allele, are still functional enzymes and are alone sufficient for their purpose. That mutant gene is called a recessive allele because having one copy has no effect, but if you get two then the catalyzed chemical reaction will stop working. You could call the normal allele the "dominant" one here, but that's not as important as the next situation.
If the mutant enzyme not only doesn't do its job but does something harmful instead, like synthesize a toxin, then you'll see negative consequences even if you have only one copy of that allele. That's called a "gain of function" mutation and produces a dominant allele.