In this more than any other of his novels, Dickens uses doubles, both structurally and in the sense of characters and plot. This is something that is signalled from the very beginning of the book, with its famous opening passage:
It was the best of times, it was the worst of times, it was the age of wisdom, it was the age of foolishness, it was the epoch of belief, it was the epoch of incredulity, it was the season of Light, it was the season of Darkness, it was the spring of hope, it was the winter of despair, we had everything before us, we had nothing before us, we were all going direct to Heaven, we were all going direct the other way...
The two cities of the title are combined with various doubles of characters, with Madame Defarge being paired with Lucie and Sydney Carton being compared with the somewhat blander Charles Darnay. These pairings are used by Dickens to point towards judgments and assertions related to the action of the novel. Note how it is Lucie's love that brings her father back to life after his lengthy captivity, whereas Madame Defarge's inexorable commitment to vengefulness is something that only leads to more and more bloodthirsty violence.
However, the doubling doesn't just establish contrasts, but also identifies parallels. Darnay and Carton at the beginning of the book seem to be more foils than doubles, in that they are completely different in character, in spite of a similarity of looks. However, Carton establishes himself as the true hero of the book by the end, and the doubling in this sense gives Carton the chance to show what he is really made of, which raises him at least as high, if not higher, in the reader's estimation than Charles Darnay himself.