It's hard, I tried to do it with the karting beginers, but they tend to let you pass by slowing down when you are overtaking them...
I tried it in a "regular" race : Compact GT championship at Suzuka with S2000 '06 car. During the last lap, I try to stay almost "wheel to wheel" with the second at least during the last 3 to 4 turns. When you are in the final straight line, you make particularly attention to the gap. My car was a bit quicker than the other one (Peugeot 206 or something like that), so I had to take that into account. Also, you have to use the outside camera, it allows you to follow closely the gap, it is really helpful.
Then you have to count on luck (0.01 is very very few), training and give it as many tries as it needs (did a lot with the karting, but at Suzuka it was OK on the 2nd or 3rd attempt).