Here's why:
* It names a thing: "Gait" refers to a manner of walking or moving on foot.
* It acts as the object of the preposition "with": The phrase "with his rags and tottering gait" describes the way he would have fooled people.
Let me know if you have any other questions about parts of speech!