First of all: Erkranken is the process of getting ill, not the status itself.
The other two have one common meaning where they are completely interchangeable.
This common meaning is a persons status of just being ill.
In case of Erkrankung in a little more specific meaning this can brake down to parts of the body being ill as in the example
Erkrankung der Lunge
Here Krankheit can not be used.
The second meaning of Krankheit is the disease itself.
A flu will always be a Krankheit and never a Erkrankung.
With Erkrankung you usually describe a process / period.
Here is an example text that tries to make the difference clear:
Joe erkrankte an der Grippe.
Die Krankheit schwächte seinen Körper und griff die Lunge an.
Die Erkrankung der Lunge schwächte ihn noch weiter.
Während der gesamten Dauer der Erkrankung konnte er kaum aufstehen.
Only the last Erkrankung could be replaced by Krankheit all other sentences would sound weird if you changed Krankheit and Erkrankung (though I have to admit, that in the second sentence you could use Erkrankung, but then again it would refer to his status instead of Grippe, so the meaning would change slightly).