For example we know that brown eye genes are dominant, but what makes them dominant chemically?
Is the dominance dependent on the phenotype of the gene? i.e Is it dominant because the eyes will be brown, or is it brown because the genes are dominant? (vice versa)
It is dependent on the phenotype. Often, dominant alleles are the functional copies of genes while recessive alleles are the broken copies. Sometimes it is the other way around. The body might require two functional copies of a gene and half a dose of a gene accomplishes the same result as no dose. In that case, the broken copy because dominant, because if you have even just one copy of it you are in the same boat as if you had two.
So, dominance depends on a lot of things, including how the resulting protein does its job. But there is nothing written on a gene that says, “I am the dominant copy, pick me and ignore others.”