In the original stories, Sir Arthur Conan Doyle left the respected Mr. Holmes completely asexual; having no interest in either gender, though he did appreciate them at times. It would have been a scandal to make any of the characters openly homosexual, as same-sex relationships to any degree of formality (marriage) or intimacy were illegal. He was depicted as a moody, though much more jovial character than our 21st century Sherlock, and did seem to have a peculiar fondness for his flatmate and colleague, Dr. Watson (who later married Mary Morstan). How that level of friendship is interpreted is up to the reader.
Snobbish-sounding history lesson over; in short, no, the original Sherlock was not gay (though many fangirls/boys alike may write otherwise) and our Sherlock has neither confirmed nor denied anything of the sort other than this conversation from "Study In Pink":
"Dr John Watson: You don't have a girlfriend then? Sherlock Holmes: Girlfriend? No, not really my area. Dr John Watson: Alright... Do you have a boyfriend? Which is fine, by the way. Sherlock Holmes: I know it's fine. Dr John Watson: So you got a boyfriend? Sherlock Holmes: No. Dr John Watson: Right. Okay. You're unattached. Like me. Fine. Good. Sherlock Holmes: John, erm... I think you should know that I consider myself married to my work, and while I'm flattered by your interest, I'm really not looking for any... Dr John Watson: No. I'm... not asking. No. I'm just saying, it's all fine. Sherlock Holmes: Good. Thank you."
Barely-hidden subtext states "GAY" in big, bold, Sharpie permanent marker letters.