The short answer is that no one knows. There's not all that much known about Shakespeare's personal life and so no one can be certain.
It is known that he was married to Anne Hathaway and had three children with her. Of course, that would not be certain proof that he was not gay.
However, the only evidence any one has for his being gay is in his writings. Shakespeare's plays had lots of situations where people fell in love with other people who they THOUGHT were their same sex but who really weren't. In addition, some of his early sonnets speak of his love for a man. But in those times, declaring your love for another man was not automatically proof that the love was romantic/sexual in nature.