Answered by Sayyidi Habib Umar bin Hafiz (may Allah protect him and benefit us by him)
Which comes first: certainty (yaqin) or knowledge of Allah (ma’rifah)?
‘Ilm al-yaqin (certainty based upon knowledge) opens the door to ma’rifah. ‘Ayn al-yaqin (certainty based upon witnessing) is part of ma’rifah.