The name Nunnally Johnson on the credits as producer (also uncredited writer) should alert you to the fact that you're likely to get a literate film with left-ish leanings (not easy in 1950 Hollywood). In this era there's a lot of overlap between film noir and Westerns, and the theme of a man haunted by his past is common to both genres. The gunfighter trying to escape his past is not exactly an original idea, but what gives it depth is the portrait of the community which is disrupted by the arrival of the man on the run. Everyone down to the barber is deftly portrayed, and the conflict between the outsider and the settled community is the stronger for it. Most of the action is internal, in the mind of the man trying to change, trying to avoid conflict, but inevitably drawn into it. Gregory Peck gives a strong and subtle performance, and is matched by Millard Mitchell as his former gang colleague, now gone straight, who is trying to hold the town together and protect his friend at the same time.
Anyone looking for an action pic is likely to be disappointed, because the gunfights are few and over in a flash. But that doesn't make it any the less dramatic or tense. Unlike film noir, however, the film ends on a note of redemption. It is possible to break the cycle of violence, and end the corrupting myth-making of the gunflighter as hero - I told you Johnson was a leftie.
Not quite a classic, because it's badly let down by Helen Westcott as the love interest. Westcott manages to be both frumpy and a bad actress. Thankfully she's not on screen for long, but it still makes the central plot point of why the incredibly handsome Peck is in town rather incredible.
But if you can ignore this, you will be well rewarded.