When playing cards (i.e. ace, king, queen, etc) started being produced in England centuries ago - the backs were left blank because the printing technology was not quite to the point where a uniform back could be printed at a reasonable cost. This blank space on the backs of "cards" was a convenient place to write notes and it became very common for a "caller" to leave a note on a card if the person they were visiting was away. Thus you could stop by someones house and leave your "calling card" with all your pertinent information if the person was out.
Card players weren't fond of that blank space on the back of cards because it made it fairly easy to cheat by marking the cards and so according to Roll the Bones: The History of Gambling, "In the 1830s, London printer Thomas de la Rue devised a new process of aligning colors that enabled him to print patterned backs." From that point on cards had a uniform colored back to go with the front which told you which card you held. By then, however, people had grown so used to leaving cards that they often had "calling cards" specifically printed up and it was just a short step away then to our modern business cards.