I don't think morally gray characters have ever really been out of style.
I love my 70s and 80s TV, but dramas back then were really cookie-cutter, and the only characters who could get away with being morally gray tended to be title characters (and even then, they were only gray because they were rebelling against a system). Other than that, most dramas were rather straight-forward, with no real philosophic or indepth discussion about morals.
Going out of style is one thing -- but bringing them *in* style is something else entirely. Now, I'm not saying that DS9 was a trailblazer in that regard, but it took advantage of taking the gray round when required. And DS9 as we know it could only have happened outside of the 70s and 80s.
But, these kind of themes were already common and literature and film. So if anything, you can see DS9 as being one of the earliest shows to treat the medium of television with the artistic respect that modern shows do now.
Agreed. These themes are all over the place in literature, but that's because they can afford the space, pacing, and maybe even less publicity. But viewers are smart, and add in more complex themes and people get hooked; indeed, if one's an avid book reader, there's a bit of a thrill to see themes actually translated to moving pictures.
On a tangent, we on this board love to talk about how different the first two seasons of TNG are from the rest of the show. But while most of that talk is about style and special effects and music, I really do think some of the later seasons showed more risks and more complexity that would've been risky earlier on. Thankfully, the show was no longer on the verge of cancellation, no longer threatened by a writers' strike, and the production crew seemed more assured with each season.