The Kabbalah speaks of "50 gates of spiritual understanding", 49 of which can be achieved by a person as a result of his own initiative. The final 50th gate is then granted by G-d from Above.
When Avraham had circumcised himself, he had reached the greatest degree of spiritual perfection that he could possibly achieve as a human being - the 49th gate - and he became "sick" yearning for the 50th gate. This is alluded to by the fact that choleh חולה [the Hebrew term for "sick person"] has the numerical value [gematria] of 49. Then "God appeared to him", revealing to him the 50th gate of spiritual understanding, which cured his spiritual sickness.
And, being that his physical sickness was a reflection of his spiritual dissatisfaction, the Divine revelation healed him physically too.
Based on Sichat Shabbos Parshas Vayeira 5750 - Lubavitcher Rebbe