Actually, the time when you need your ECFMG certificate varies from one program to another. You will find that the majority of path programs require you to be ECFMG certified at the time when you apply for residency (ie around September). Most of the good programs have this requirement and you will not be offered an interview irrespective of your other USMLE scores and other credentials.
Of the remaining programs, most simply require that you be ECFMG certified before you start residency.