What confuses me about "homologous gene"
Can you please directly cite your textbook. Either your textbook is wrong or you massively misinterpret it.

The concept of homology refers to the concept of shared ancestry. From wikipedia


  In biology, homology is the existence of shared ancestry between a pair of structures, or genes, in different taxa. A common example of homologous structures is the forelimbs of vertebrates, where the wings of bats, the arms of primates, the front flippers of whales and the forelegs of dogs and horses are all derived from the same ancestral tetrapod structure.


I would add that a common counter example are bats wings and bird wings (which is an analogy).

Two genes are homologous if they both derive from the same ancestral gene. Of course, as ultimately, all genes are related, the concept only make sense by comparison to other structures that are more distantly related or relative to a time point in time.

For more information, just have a look at any good introductory course or textbook to evolutionary biology (for example evo101 > homology)