For simplicity purpose, you can consider ECFMG to be equivalent what MCI is to Indian medical graduates.
To get a registration from MCI, you need to be enrolled in MCI recognized medical college and then clear medical degree to apply for MCI/State medical license registration.
Similarly, ECFMG provides certification when you complete first 2 USMLE steps-1, 2 CK & 2 CS plus verification of your international medical credentials. Only once you are ECFMG certified, that you can enter US Residency. USMLE is licensing exam to practice medicine in USA by entering in Residency/Fellowship course, without which you cannot practice in USA in spite of having a US medical license.
ECFMG will also be responsible for handling your visa sponsorship in US unless you receive a work visa or till you get green card. Thus, it has multifaceted role for a FMG/IMG.