"being at the top," 1590s, from top (n.1). Top dollar "high price" is from 1942. Top-drawer (1920) is from British expression out of the top drawer "upper-class." Top ten in popular music is from 1945 ("Billboard"). The top dog is the one uppermost in a fight, from 1868 in figurative use, opposed to the underdog.
But if the under dog in the social fight runs away with a bone in violation of superior force, the top dog runs after him bellowing, "Thou shalt not steal," and all the other top dogs unite in bellowing, "This is divine law and not dog law;" the verdict of the top dog so far as law, religion, and other forms of brute force are concerned settles the question. [Van Buren Denslow, "Modern Thinkers: What They Think and Why," 1880]