Is there any possibility that gender is determined by Temperature?
It is definitely more than science fiction. Many species have sex determination that depend upon the temperature.

As a rule of thumb, when it comes to sex, not much has been invented in fictions. The diversity of reproductive system is HUGE! I will not mention 1% of the existing complexity in sex systems. For simplicity, below I will limit my concepts and examples to big animals only. I won't talk about


double fertilization
cloning
parthenogenesis 
dosage compensation
Mating types
Cases of multinucleated cells typically in fungi but not only
Asexual reproduction
Systems with more that two genders or with coexisting hermaphrodite along with a single other gender
Liability factor
Reaction norms for sex determination
How reproduction relate to all that
How dosage compensation relate to all that
How the concept of individual relate to all that
etc...


Sex Determination System: GSD vs ESD

There is a great diversity of sex determination system. The standard is to classify them in two


Environment Sec Determation (ESD)
Genetic Sec Determation (GSD)


Of course, the reality is more complex. In many species a mixture of both genetics and environment clues matter. 

Within ESD species, there is quite a bit of variety. Some species use temperature (e.g. crocodiles, Nile tilapia, Australian skink lizard), others use social cues (e.g. clownfish, swordfish, boa constrictor).

Within GSD, there is also a great deal of diversity. By far not all species use the XY system used in mammals.

Related post


Do males of all sexual species have Y chromosomes?
Have there been any theories put forward as to the reasons behind Temperature-Dependant Sex Determination in reptiles?