The hadith is authentic. Sunnis have also narrated this hadith in some of their sources.
As for people who came before Imam Ali (a), we say the following:
1- If previous nations loved their prophets and obeyed them, that indicates they had the Wilayah of Imam Ali (a) in general. When you love your prophet and obey him, you believe in his successors and in the continuation of his message, and that’s what the Wilayah of Imam Ali is about.
2- People who loved their prophets and obeyed them would love Imam Ali (a) if they knew him in specific and in detail.
Hence, pagans in previous nations did not love their prophets, which reveals that they would not have loved Imam Ali, which then explains why Hell was created.