The reason why "Marte" does not take an article is that it is a proper name, not a common noun. Proper names only take the article in certain cases, mostly when the common noun they designate is omitted. This is the case, for example, with the names of rivers and mountains:
- El (río) Támesis / The (river) Thames
- Los Alpes / The Alps (in this case, we can consider that the noun "montes" - i.e. "mounts" - is omitted).
Another case is that of countries which include a common noun within their names: the United Kingdom, the United States, the Russian Federation.
Although the general rule is that, except for the examples above, proper nouns don't take articles, they may take one when they are treated as common nouns, as when we say:
Conozco a un Juan que es profesor. (I know a John who is a teacher.) (Here "un Juan" means "a man called Juan")
¿Dónde pusiste el Rembrandt? (Where did you put the Rembrandt?) (Here "el Rembrandt" means "the picture by Rembrandt")
La María que conoces no es la que conozco yo. (The Mary you know is not the same I know.) (Here "la María" means "the woman called María")
It is hard to think of the names of planets being used as common nouns, but they might, as could be the case if there were two or more planets with the same name in different galaxies, or to refer to different temporary features of the same planet, for example:
- El Marte inmediatamente posterior al Big Bang no es el mismo Marte de ahora. (The Mars soon after the Big Bang is not the same as today's Mars.) (Please note that this sentence is to be considered as a linguistic specimen and not from an astronomical perspective!)
Proper names do not have a gender per se, but one that is associated with the common noun they designate: since "Marte" refers to "un planeta" (a masculine noun), in case it takes an adjective it will be masculine because "planeta" is masculine e.g. Marte es rojo.