There is an app called Ghostracer for Android that does this, but I haven't tried it out nor do I know if they have an iPhone version.
Ghostracer App - Running & Cycling Real Time Segments
Garmin computers do this as a built-in feature. You can load the segment on them and choose the time you wish to use as your "virtual partner," then it shows you your time in relation.