Ellie's attraction to Riley, a friend who was at the FEDRA Academy with her and who died the night Ellie was bitten, is central to the most recent episode of the show. Naturally, many wondered whether Ellie's sexuality was a change from the show's source material or not.
While Ellie's sexuality doesn't come up at all in the original Last of Us game, it has been crucial to subsequent installments of the franchise.
Episode 7 is mostly adapting Left Behind, an expansion of The Last of Us that was released one year after the game. The expansion was solely focused on Ellie and the time before she was bitten. As is the case on the show, Riley and Ellie share a kiss in The Last of Us, which seems to suggest that Ellie is interested in women. And, not to spoil The Last of Us: Part II, but Ellie's sexuality is crucial to that game as well.
So, while Ellie's sexuality is never explicitly discussed in The Last of Us, revealing that Ellie is gay isn't at all a departure from how the games have treated the character. Ellie's attraction to women is a core part of who she is, and the games have never been shy about leaning into that. In the original game, Ellie spends most of her time with Joel or other adults, which is why it never comes up.