The Phrase Finder reports that this expression is often incorrectly said to come from the increased cost charged by painters based in part on the number of limbs that would be shown. However, the phrase originated in America sometime after World War II, and is intended to reflect that the cost of something would be enormous. It is possible the phrase references the high cost paid by soldiers who had lost an arm or leg in the war. It is more likely the origin was nineteenth century phrases “I would give my right arm for…and [Even] if it takes a leg.”