The director of "Top Gun" is Tony Scott (brother to Ridley Scott), who is openly gay. who was widely rumored at he time to be gay.
[Edited to correct for factual content. I've confused rumor with fact on this point. My apologies.]
The widely told story of "Top Gun" is that after Tony Scott turned in his "final" cut, the studio wanted to add a couple of scenes to underscore the "heterosexuality" of Tom Cruise's character. (The studio execs were reportedly aghast that with the all the shirtlessness and locker room scenes, the film looked like a gay softcore.) Kelly McGillis had already cut her hair for another movie, ("Witness" perhaps?) and so the added scenes were the elevator scene (she wears a hat), and the bedroom scene at the end (the gauzy fabric isn't just for romance, it's to keep you from figuring out that the hair she is wearing isn't entirely her own).
IMDb has a slight variation on the story...same idea, though.
# The love scene between Tom Cruise and Kelly McGillis was filmed after initial test screenings. Moviegoers complained that there was no love scene, so the company obliged. McGillis, however, had already dyed her hair darker for her next film. This is why the scene is tinted blue. Also noticeable as a subsequent shoot due to the longer length of Tom Cruise's hair (particularly in front).
# Like the love scene, the elevator scene (where Maverick and Charlie meet after Mav's workout) was filmed post-production. Kelly McGillis's hair had already been colored for another movie role, that is why she is wearing a hat. Tom Cruise's hair is longer in the shot, as well.