The word "Yahoo" was invented by Jonathan Swift for the Travels.
He and his friends used the word among themselves while Swift was writing he book, appearing in their correspondence.
In part IV of the Travels - Houyhnhnm Land, Gulliver initially mistakes the Yahoos for beasts, or cattle, since they are so repulsive in appearance and action. Eventually he concludes they are human, possibly descended from a pair shipwrecked long ago. Once Gulliver determines humans and Yahoos are the same, he begins to call all people "Yahoos."