That's a lot bigger than a single gene. The difference between a gene and a karyotype is like the difference between a baseball and a ballpark. They start by organizing them into the 22 pairs. Since you get one copy of each chromosome from your mom and your dad, these matching copies can be paired. The first way is to sort them according to size.
Some chromosomes are much longer than others.
Second, the position of the centromere relative to the end of the chromosome is used to help tell chromosomes apart. Centromeres are designated either metacentric, submetacentric, or acrocentric. Metacentric chromosomes have their centromere near the center of the chromosome. Submetacentric chromosomes have slightly off-center centromeres, such that one chromosome arm is longer than the other. Acrocentric chromosomes have the centromere located very near to one end.