Hollywood came up with that term in the 1930s. The most common word actually used back then was "gunhand." "Shootist," "pistolier," and occasionally "pistolero" were also used, but less common.
The word "gunslinger" is bullshit, just like so many other things that come from Hollywood.
Me: "That's my Great-Grandfather when he and his older brothers had to ride with a posse going after a serial rapist in southwest Arizona in 1916."
Friend: "Your gramps was a gunslinger? Cool! He must have shot all kinds of fools!"
Me: "Nobody said gunslinger back then, fuckstick, they were called gunhands. And no, Great-Grandpa wasn't a gunhand just because he knew how to shoot. He wasn't a bounty hunter or anything like that. They went to apprehend the fucker, not just kill him outright. They caught him and brought him back. He stood trial, was convicted, and they hanged his ass."