The "antagonistic DM" tone of much of Gygax's D&D writing is often misunderstood, in that it's actually mock-antagonistic in the manner of a tough coach or drill instructor -- Gygax envisions that a big part of the DM's job is to "push" his players to excellence (developing their player-level tactical acumen and problem-solving skills) and that that excellence will make the game more enjoyable for players and DM alike. Gygax is not a "killer DM" and has never advocated that style (and in fact preaches against it in the 1E DMG and elsewhere) but he is a "mock-killer DM" or poses as one -- he acts like he wants nothing more than to kill your characters, and feigns frustration when the party survives and defeats the challenges and like a melodramatic movie-villain shakes his fist and declares he'll get you next time, but the reality is exactly the opposite. Gygax as DM (read his various advice in rulebooks and modules, his "Mastery" books, or his Q&A threads here) doesn't want to kill the characters of players who are playing well, and considers a TPK (ostensibly a "victory" for the antagonistic DM) about the worst thing that can happen in the game. He wants to players to succeed brilliantly and dazzle him with their problem-solving skills in ways he never anticipated. But he thinks the best way to achieve that sort of performance isn't by coddling or taking it easy on the players, but rather by pushing and challenging them (and, yes, punishing them when they fail to perform or, especially, take the challenge seriously), like a tough coach or a drill instructor.
This, of course, isn't an approach that will work for everybody -- many (probably most) players are in the game to escape, relax, and socialize, and don't particularly want to be challenged or to have their "skills" honed in a crucible -- the difference between pick-up or rec-league sports and a high school or college program that's aiming for a championship season. A disconnect here can ruin the fun for everybody -- the DM frustrated because the players aren't responding to his coaching and stepping up their game, the players frustrated because the DM rewards their "good roleplaying" (i.e. playing a flighty or naive or low-average Int/Wis/Cha character like he's not part of a commando strike-team) by repeatedly killing their characters and putting them in situations they don't enjoy (they want to hang out in town chatting with the locals and developing their characters, he puts them in rooms with no exit and a lowering ceiling and gives them 2 minutes realtime to figure out a solution before everybody dies, etc.).
That's why open communication is key, and adaptability, and compromise (and, to an extent, choosing the right group to play with in the first place -- sometimes people are just going to have incompatible agendas and preferences, and in the long run it's probably better to just not play together than to constantly butt heads -- there's nothing wrong with this, it's not anything to be ashamed of; the idea that every D&D player should be able to get along and play with every other D&D player is unrealistic and naive).