hey xtraordinary.
so a lotta people mentioned how its impossible but it is.. technically possible. people's sexualities are fluid, theoretically a guy who was straight for 30 years of life Could develop homoerotic/romantic feelings towards only one person one day, and if they still see themselves as straight because it's just this one dude, then.. i mean, yeah, they're straight. guess what? sexualities are self-given descriptors.
the thing about fiction is that it's fiction, and even a super unlikely kind of annoyingly-cliche scenario where an otherwise straight man falls for a gay guy isn't that uncommon and isn't theoretically impossible, just highly improbable and as mentioned before, kind of annoying because it undermines gay, bi, and pan sexualities.
let's talk about the olden times though, because you did step on a really common thing here
when homosexuality was illegal I'd say (not based on anything concrete, but I mean this is totally google-able) I'd assume most gay or bi people classified themselves as "straight but id go for that" because being gay was so dangerous and seen as detestable. and its important to remember that love comes in many many forms, and so does sexuality, with the right social pressue and base understanding, and general circumstances, a person who'd otherwise be seen as completely gay could totally see themselves as staight and feel real feelings towards women, and that's something to remember too. just because someone's gay, don't mean they can't love a woman, it's just in a different way and maybe they're forced to channel what would otherwise be a more platonic love into a weird mimic of sexual/romantic love.
the thing is though that the gay community was almost like a seperate society up till im gonna say the 90s? and even then... I think a lot of us don't really get to hear about that community and learn about it and what it was like, what were the social norms, what was commonpalce for a gay person who's actively identifying themselves (even if in secret) as gay during those times in history, instead getting this sort of (completely mistaken) view of history where 20 years ago gay people barely existed when, in fact, gay people were fucking living it up. and the thing is that it's very hard to find proper places to learn about these things from because they were so intertwined into the society at the time but not talked about in public, records were just not something kept that well and it's not always easy to find the context in which hearing someone talk about crazy sex & drug parties, but it's not impossible.
i guess what im getting at here is that your story concept is completely valid and there can be a lot of truth to it, if you want there to be (I mean honestly? you don't have to), but if you wanna touch on that subject you're gonna have to prepare youself to Really Dig In to some sweet, sweet research because there's a lot to be unconvered.
also this is like, a really fucking huge period of time. when are we talkng here pal? the 30s? 60s? there so much to go on here bud.
On a sidenote if you just wanna have some fun with easily accessible based-on-a-rea-story gay-romance content rooted in those time periods (and to be fair i dont watch a lot -by which i mean i barely watch any- but they're still good)
A Very English Scandal - Hugh Grant (i know right?) and Ben Whishaw (q from the new bond movies) play a very fun and fantatically written story about a politician and his ex-lover's ... complicated relationship. prepare for some politics, murder, and flamboyant drama. it's a 3 episode series which touches exactly on that "gay but identifies as straight" finer points
Kill Your Darlings - Daniel Radlcliffe (harry potter), Dane DeHaan (he did the green goblin that one time) and for some reason though im not complaining Michael C. Hall (dexter) with a large and overall really fantastic cast play Allen Ginsberg, Jack Kerouac and William Burroughs (yes, the poets) in a truly beautiful, dare i say masterpiece of a movie, with poetry, murder, homosexuality, and some really good cinematography. like, damn. it took me all of 2 seconds to fall in love with this film.
Risk - this isnt a movie but it's a podcast (its very nsfw so fair warning) which has peopel come on up and tell their true stories about life and everything small to big and it has a lot of truly great stories settled around the 70s, 80s, about the gay commnunity which are always great fun and if you have the patience to seek them out, they're always worth a listening to (hosted by kevin allison, yes that dude from the state)
edit: sidenote about this one yes i said the 80s but like i said earlier, its hard to find personal testimony stories without actively looking for them which i wasnt so. thats what i got, man