One who is dominant or victorious.
'Top dog' is synonymous with the similar, if now archaic, phrases, 'upper dog' and 'over dog'. It is also the antonym of 'under dog' (now usually spelled as a single word) and its archaic synonym, 'bottom dog'.
We have here a golden opportunity for those who consider plausibility to be enough evidence to hang a phrase derivation on and the following explanation has been widely repeated. When wooden planks were sawn by hand, two men did the job using a two-handed saw. The senior man took the top handle, standing on the wood, and the junior took the bottom, in the saw-pit below. Add to this the fact that the irons that were used to hold the wood were called dogs and that the bottom position was much the more uncomfortable, and we can jump from this scene to the origin of 'top dog' and 'underdog'.
That may be true. The problem with it as an explanation is that no one has found evidence to back it up. There are printed references to saw-pits and to this form of work going back to the early 15th century in England and the 19th century in America. None of these make any mention of 'top dog' or 'under dog'. It is hardly likely that everyone, including Shakespeare, who referred to saw-pits in The Merry Wives of Windsor, would have ignored these colourful phrases had they been in use at the time. For example, this extract from the 1876 Yale Review describes saw-pits in some detail makes no mention of 'top dog':
"The saw-pit was a rude structure about seven feet high, made of strong posts set in the ground wide enough apart to hold one or two pieces of heavy pine timber, and the sawyers, one above and one beneath, sawed out one hundred feet per day."
In fact, there are no known references to 'top dog' or 'under dog' in the context of wood sawing until well after the practise was superseded by mechanical sawing.
What citations there are to these terms that date from the days that the pits were still in use all refer to fights of some sort, particularly dog fights. Here's a piece, for which the word doggerel might have been invented, that appeared in several US newspapers in 1859, under the name of David Barker:
The Under Dog In The Fight
But for me - and I care not a single fig
If they say I am wrong or right wrong,
I shall always go for the weaker dog,
For the under dog in the fight.
I know that the world, that the great big world,
Will never a moment stop.
To see which dog may be in the fault,
But will shout for the dog on top.
The earliest record that I can find of a figurative use of 'top dog' is a 20th century one, in The Speaker; a review of politics etc., 1900:
"The most popular argument in favour of the war is that it will make the individual Briton top dog in South Africa."
There are several earlier examples of a related phrase - 'tip-top dog' and these all relate to actual prize fighting or hunting dogs. For example, from The Sporting Review, 1840:
"Even a good judge may be unable to form an accurate estimate of a dog's olfactory powers, Should there be no tip-top dog at hand to compare with, the only other criterion ... is the manner of finding game."
The move from 'tip-top dog' to 'top dog' is quite easy to accept and, while the saw-pit theory as the origin of 'top dog' and 'under dog' is attractive, the complete lack of evidence to support it renders it as mere speculation. There appears to be little reason to doubt that 'top dog' had a literal derivation - 'a dog that is top'.
See also: the Nonsense Nine.