In the early phases of The Lord of the Rings, the hobbits meet another hobbit in The Prancing Pony, and his name is Trotter. Obviously he built upon this and it morphed into them meeting a man named Strider.
The words Trotter, Strider, and Ranger are all linked and as Tolkien was wont to do, he constructed something, or 'fills in the gaps' from simply a basic word. I think at the initial phase this particular man was a Ranger because he was someone who wanders in the wild.
I personally contend that Tolkien borrowed this idea from the Eddas and Nordic Mythology (like all the dwarves and Gandalf in the Hobbit). Odin travels about and uses the name Gangleri, which means 'wandering stranger' or something like that, but is often translated as 'Strider'. I think Tolkien then built upon this structure for Aragorn. Once it is established that Strider is a Ranger, then he must come up with what a Ranger is, and we see that a Ranger is essentially one of the Dúnedain, whose skills and ability makes them natural defenders of good and fighters of evil, living out of doors, tracking, hunting, etc. And as the ancient line of kings is harbored among the Dúnedain, we now have a character who is a descendant of these kings and his name is Aragorn. I don't have evidence, but my hunch is that I think Tolkien derived all of that from the word/name Gangleri.