One Internet report says:
One source says that the expression might have become popularized in the 1920s when a lot of boys studied Greek and had dogs named Hector, but it's more likely that the expression is older, and that both it and the dog-naming fad relate to the story told by Euripides: Hector's mother, Hecuba, got turned into a dog for killing the murderer of her older son, Polydorus, so Hector by extension was a dog's son--a pup.
Either way the phrase seems to have come from mythology.