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 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 makes 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, 1600, 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
I know that the world, the great big world,
From the peasant up to the king,
Has a different tale from the tale I tell,
And a different song to sing.
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.
But for me I shall never pause to ask
Which dog may be in the right
For my heart will hear, while it beats at all.
For the under dog in the fight.
Perchance what I've said I had better not said,
Or 'there better I had said it incog.
But with my heart and with glass filled up to the brim
Here's health to the bottom dog.
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.