The Akkadian word for aloe was sibaru, and the related Syriac word was צברא. From these more ancient language the word entered Arabic as sabr. The Arabic word entered Hebrew in the Middle Ages. For example, we find that Ibn Tibbon, in his translation of the Rambam's Shmonah Perakim (Chapter 4) writes that tzabar צבר, in la'az (foreign language) is "aloe".
When the Spanish found the prickly pear cactus in Mexico, they brought it back to the "Old World", and the plant particularly succeeded in spreading in the Mediterranean area. Both this cactus and the aloe are spiky and succulent - and so the Arabs called the new plant sabr as well.
This imported plant interestingly became the nickname for the those Jews born in the Land of Israel. Oz Almog writes in his book, The Sabra: The Creation of the New Jew (on page 4):
Ironically, the tzabar, or prickly pear cactus, is not native to Israel. It was introduced from Central America some two hundred years ago, but quickly acclimatized. In fact, it took hold so well in Palestine that it became one of our country's best-known features. Even before it became a symbol for the country's Jewish natives, the tzabar, or "sabra," cactus appeared in paintings, stories and songs of local artists and was cited by visitors as one of the outstanding visual elements of the Palestinian landscape.In addition to aloe / cactus, in Arabic the root sabr means "patience" Stahl quotes Yitzchak Yehuda as saying that both terms come from the same root, and are cognate to the Biblical Hebrew שבר and Aramaic / later Hebrew סבר - "to see". One who has patience is watching to see what will happen. Another theory that Stahl mentions is that sabar means in Arabic "to bind" and from here "to restrain, to be patient". This would connect sabr to the Hebrew צבר - "to heap up, accumulate". This is the root of the word tzibbur - originally heap, later collection, congregation. Related to the meaning "to bind", is a meaning in Literary Arabic of "to embalm". Embalming was often done with aloe - the English word "embalm" literally means "preserve with spices." This seems like a bit of a stretch to me - the binding was done with bandages, not with aloe, so I don't see how that verb would have given the name to the plant.
The widespread use of the word "Sabra" as a generic term for the generation of native-born Israelis began in the 1930s, but the first glimmerings of a generational term can be seen forty years earlier in the use of the Biblical term "Hebrew".
In time - during the 1930s, and even more clearly in the 1940s - "Sabra" changed from a derogatory term to one of endearment. The emphasis was no longer on the cactus's sharp spines but rather on the contrasting sweet pulp of its fruit. This was taken as a metaphor for the native Israeli, whose rough, masculine manner was said to hide a delicate and sensitive soul. The appellation contained another symbolic comparison - just as the prickly pear grew wild on the land, so were the native-born Israelis growing, so it was said, naturally, "without complexes", in their true homeland.
Credit for the transformation of the term "Sabra," now with a modern Hebrew pronunciation, into a generic term for the native-born Israelis was claimed (rightfully, as far as I have been able to discover) by the Journalist Uri Kesari. On 18 April 1931, the newspaper Do'ar HaYom published an essay by Kesari titled "We Are the Leaves of the Sabra!"
In any case, it is certainly ironic that a synonym for "patience" became identified with Israelis. That is not one of the traits they are generally said to be blessed with!
The plant in Modern Hebrew is known both in the singular and plural as "sabres". According to this article by Yoram Meltzer, this suffix comes from Ladino - and we see it in the word burekas as well. In Ladino, the suffix "-es" means plural, but that significance has been lost over the years, and so we hear in Hebrew "burekasim" and "sabresim".
I think I first became familiar with the term "sabra" via the Israeli liqueur. According to this article, in 1963, Edgar Bronfman, the head of Seagrams, felt it was important to have an identifiably Israeli liqueur. Originally, the drink was made from the tzabar fruit. However, this was not successful, so it was changed to the now familiar chocolate-orange.