Grant Williams really is an interesting enigma.
He died shortly before Rock Hudson, whose death pretty much started a new trend with actors and actresses "coming out" without as much shame as in the past. Many of these did so in the 1990s when the Clinton administration was more tolerant and many felt that the AIDS epidemic had caused more homophobia than necessary. Their coming out was part of a wider cause.
Even if he claimed to be straight, something wasn't quite adjusted in his make-up because he didn't seem any more excited over women than, say, Roddy McDowall. Actually McDowall would have been a good role model for him, keeping his private life discrete but also not being a huge constantly-in-the-public star who had to worry about his private life. Not that McDowall did all that much and biographers are still debating whom all he was intimate with due to all of the "we don't kiss and tell". He was quite happy wearing the ape costumes in Planet of the Apes and providing voice-work to animated cartoons of Chuck Jones, so he was still successful in his career without interviewers constantly bombarding him with "when are you getting married" questions.
My impression after reading up on him is that both his religion and his military training were at play here. He was very disciplined and loved a lot of structure. Maybe he was OK not acting on any physical desires if they weren't of the "norm". It is tempting to think he experimented a little in his youth, but felt he "sinned" and would not try it again. Or maybe, he favored women more than men but was way too nitpicky. Maybe he remained a virgin? Not that it matters, since many people lead very successful lives staying virgins. It is only a state of mind that you are either comfortable or uncomfortable with. After all, not everybody has tried scuba diving either and, like sex, it may not be that big of a deal.
Ramon Novarro was a devout Catholic who was, of course, outed after his death, but he "compartmentalized" his faith and his physical desires separately in a rather intriguing way as profiled in Andre Soares' excellent Beyond Paradise. Novarro's biggest vice was his alcoholism, which prompted him to be less discrete and careless in his final years. That is how the two hustlers took advantage of him and killed him.