Meaning
Gnosis; inner, mystical knowing — as opposed to bookish ilm.
How Iqbal uses it
The direct knowledge of the heart. Despair, he says, is the decline of both ilm and irfan; the man of faith never loses hope because he is one of God's confidants. Irfan is knowledge that has become sight.
See it in the verse