It is narrated by Ammar Yasir (RA) that a beggar came to Ali and stood besides him. Ali was kneeling in prayers. Ali put out his ring and gave it to the beggar.
Then Ali (AS) called on the Prophet (SAW) and gave him the news. At this occasion, this verse (5:55) was revealed.
Ref: The Ghadir Declaration, by Dr Muhammad Tahir ul Qadri, pages 48-49.
“It is narrated by ‘Ammār bin Yāsir (RA) that a beggar came up to ‘Alī (RA) and stood beside him. He was kneeling in prayer. He (Ali) pulled out his ring and he gave the ring to the beggar. Then ‘Alī (RA) called on the Prophet (SAW) and told him the news. At this occasion, this verse was revealed to him: (Surely your (helping) friend is Allāh and His Messenger and (along with them) are the believers who establish prayers, pay zakāh and bow down (in humility before Allāh (SWT)). Allāh’s Messenger (SAW) read out the verse and said: One who has me as his master has ‘Alī as his master. O Allāh! Be his friend who befriends him (‘Alī) and be his enemy who is his enemy.”
Ref: Tabaranī related it in al-Mu‘jam-ul-awsat (7:129, 130 # 6228), al-Mu‘jam-ul-kabīr (4:174 # 4053; 5:195, 203, 204 # 5068, 5069, 5092, 5097), and in al-Mu‘jam-us-saghir (1:65), and in Ahmad bin Hambal narrated it in al-Musnad (1:119; 4:372), and in Hākim, al-Mustadrak (3:119, 371 # 4576, 5594).
More to come insh'Allah.