Was the second part of the Kalima, “Ali’un Wali Ullah wasiyay Rasul Allah” a later addition? Or was it always there, since Rasul Allah (saww) first nominated Imam Ali (as) as a successor when he invited his family to dine with him at the start of the spreading of Islam? If it was a later addition, when was it added? By whom and why?

And is it an obligatory part of the Kalima?

If you are asking about Adhan, there is a report that states after Ghadeer Bilal said the third Shahada in the Adhan (though it does not have a strong chain). Nonetheless some scholars have accepted it. But scholars agree it’s not part of Adhan. It’s a recommended add-on because it’s recommended to mention Imam Ali (a) when we mention the name of the Prophet (s). It’s not wajeb.

If you mean believing in it, that Imam Ali (a) is our leader and guardian, then yes it’s wajeb. One cannot have his faith complete without the Wilayah of Imam Ali (a). It’s mandatory to believe in his Wilayah.