The original idea for Gunsmoke at CBS was a crossing of mysteries and Westerns: Philip Marlowe in the Old West. The idea morphed a bit in development, but a constant throughout was an insistence on making it an adult Western. Most Westerns on the radio were kids' shows -- along the lines of Hopalong Cassidy or The Lone Ranger. The idea with Gunsmoke was to create a Western series that didn't sugarcoat the Old West. And that was the result. It's never explicit, but there are plenty of clues that Miss Kitty is a prostitute and that Marshal Matt Dillon, while on the side of the law, is very much like some of the men he hunts down. And he is not some white-hat hero always there in the knick of time. Sometimes he fails. The series also regularly handled hard issues: mob violence, domestic abuse, rape. Dangerous territory, but it handled it well: Gunsmoke is easily one of the top shows of the Golden Age.
The radio show ran from 1952 to 1961. Of course, most people today know of Gunsmoke from the television version, which ran from 1955 to 1975 for an astounding 635 episodes. Many of them were original to TV, but quite a few were adaptations of radio scripts, especially in the early years. The TV show had a different cast -- William Conrad, who played Dillon on the radio, to much acclaim, didn't have the look they wanted (it's generally thought that his weight was the factor). James Arness got the part instead. This arguably came near to killing the TV series -- Conrad's Dillon was iconic, and many fans of the radio show refused to watch the television series. But the stories made good TV as well as good radio, and the series survived. It was also the twilight of the age of radio and the dawn of the age of television; it was perhaps inevitable that the television series would outlast its originally more popular radio counterpart and rival.
Of all modern genres, the Western is perhaps the one that is most thoroughly concerned with the concept of Civilization. Most major tropes in the genre are about the building of civilization, or about protecting it from the greed, brutality, and ignorance that constantly threaten to bring it down. One episode of Gunsmoke that is exactly in this line is "What the Whiskey Drummer Heard". Unlike many stories, it doesn't give us any inkling of what to do about the struggle between civilized life and barbarism, but it puts the contrast in perhaps the most stark terms: at its root, it's a struggle between Reason and Unreason. Marshal Dillon has to watch out when a whiskey salesman tells him about overhearing men plotting his death. It has all the trappings of a mystery, but it is handled in a way very different from what you would find in a mystery tale -- and in a way that fits the Western genre to a T.
You can listen to "What the Whiskey Drummer Heard" at Old Time Radio Westerns.
The same script, with minor variation, was used for an episode of the TV series a few years later.