Title explains it all.
Today. We still have all of those things. No Country For Old Men hits just about every Western trope and it's set in the early 2000s. It has a sheriff, bandits, good guys, bad guys and guns. There's even a horse or two.
The "Wild West" never has an official end, but a common date is 1890, when the U.S. census claimed that the Western Frontier no longer existed. American settlements had filled in all the spaces between the coasts.
The essential pieces of the Western still existed well into the twentieth century though. People rode horses, grazed cattle, robbed banks, wore cowboy hats.