Referencing the rules for the 2014 Tour De France (I am assuming that these follow general standards for international cycling, but had a hard time finding a specific source for global cycling competition rules, like FIFA has rules for soccer around the world - if anyone finds a set of rules, I'd be interested in seeing them).
Article 24 of the rules has the following to say in regards to ranking:
Blockquote
a) General individual time ranking
The general individual time ranking is established by adding together the times achieved by each rider in the 21 stages, including time penalties. In the event of a tie in the general ranking, the hundredth of a second recorded by the timekeepers during the individual time trial stages will be included in the total times in order to decide the overall winner and who takes the Yellow Jersey. If a tie should still result from this, then the places achieved for each stage are added up and, as a last resort, the place obtained in the final stage is counted.
To give a little context, in most stages the time is rounded to the nearest second. But in time trial stages, the times are recorded to the nearest hundredth of a second, specifically to act as a tie breaker in this situation. It seems that if that's STILL a tie, then they look at lowest rank-sum over the entire competition.
The rules are here. The English version starts on page 27 (of the pdf - page 26 of the printed version) and Article 24 starts on page 38/37. There are other tie breakers in place for the other big awards given out at the Tour De France, but I stuck with just the time winner (yellow jersey) for this answer.
http://www.letour.com/le-tour/2014/docs/TDF14_reglement_BD.pdf