A ringer is a horse substituted for another of similar appearance in order to defraud the bookies. This word originated in the US horse-racing fraternity at the end of the 19th century. The word is defined for us in a copy of the Manitoba Free Press from October 1882:http://www.phrases.org.uk/meanings/dead%20ringer.html"A horse that is taken through the country and trotted under a false name and pedigree is called a 'ringer.'"It has since been adopted into the language to mean any very close duplicate. As a verb, 'ring' has long been used to mean 'exchange/substitute' in a variety of situations, most of them illegal. From the same period is the term 'ring castors', meaning to surreptitiously exchange hats. Castors, or casters, were hats made from beaver fur. From the 20th century we have the Australian phrase, 'ring in the gray (or knob)', meaning to substitute a double-sided penny for a genuine one. Coming more up to date we have 'car ringing', which is the replacing of the identification numbers on a stolen car with those from a genuine (usually scrapped) vehicle.
So, that's ringer; what about dead? Dead, in the sense of lifeless, is so commonly used that we tend to ignore its other meanings. The meaning that's relevant here is exact or precise. This is demonstrated in many phrases; 'dead shot', 'dead centre', 'dead heat', etc.