If you haven't read yet, I recommend you to take a look at "Gay, Straight, and the Reason Why: The Science of Sexual Orientation" by Dr. Simon Levay. It helped me understand how sexual orientation is determined. He is a neuroscientist so the book also has a biological perspective.
To my knowledge, there is not a clear explanation how some person is gay, there are just theories about it. Some say it is purely genetics, others claim environmental effects should be considered etc. For example, according to a study from the book, homosexual people were exposed to some hormones and chemicals in the womb during a critical period so that some particular regions of the brain are formed and function like the opposite sex but some other regions don't. However, there is also a genetical tendency whether this "malformation" can occur. Anyway, I cannot say too much since I am not a true expert in neurology and psychology, but I recommend Levay's book.
I don't think someone calling himself/herself gay becomes straight.