The reasons the Communist party in Cuba has stayed in power for so long even after the fall of the U.S.S.R. are complex and varied but I see two distinct categories, internal and external.
Let's start with the internal reasons. Some background may be necessary... The government of Batista was genuinely unpopular; it was corrupt, savage, and let american companies run roughshod over what were -and still are- proud people. None of that endeared the government to the people. It made even an extremist alternative, an armed insurrection and a revolution, completely plausible and incredibly attractive to a great many cubans. The Batista government was also the issue of a military coup. Which further reduced it's legitimacy in the eyes of the Cuban people.
Batista had close, personally profitable, connections to American organized crime. He even involved the state in his dealings with the mob. He and other government officials would receive bribes and in turn the government would enter into a scheme where the mafia-owned nightclubs, casinos and racetracks would receive matched investment funds from the Cuban state, a long -in theory limited by the passage of time but in reality permanent- tax exemption, and other special consideration from the state that were all widely talked about by the Cuban public.
Then there was the government's relationship with American business. Which, arguably had an even greater impact on the lives of the Cuban public. The best example is the case of the Golden Telephone, a literal golden telephone gifted to Batista by an American phone conglomerate for granting them absolutely ridiculous increases in the cost of telephone-use inside Cuba. Batista was personally enriched by bribes and cubans in turn had to pay more for basic services provided by American companies.
By 1955, Cuba's economy was in dire straights. There were almost no outlet for Cuban students fresh out of school, regardless of their level of scholar achievement. Unemployment was rife and so were the anti-Batista demonstrations. Once again, instead of conciliation or a change in his way of governing, Batista chose repression. It was to be one of the proverbial nails in his government's coffin.
The Batista regime became gradually less and less popular as time went on and it had to rely far more on it's armed forces to keep the public in check. When pushed too far, the public turned to the Revolutionaries who had become a solution to a real and omnipresent problem. The aura of saviors acquired by the Cuban Revolutionaries was in part a product of the incredible unpopularity of what they replaced. The moral superiority of the Revolution was real after they took power and it was played up big time by Fidel and his subordinates. Sure, propaganda played a part but it was more a matter of blowing up reality to more impressive levels than inventing much of anything about the roots of the Revolution.
In removing the Batista government, Fidel and his followers became heros. Which has had and still holds a particularly strong hold on the Cuban public. But Fidel was also very effective at using his popularity to consolidate power and in turn using his power to buttress his popularity. He has used all the classic hallmarks of a Communist-inspired takeover such as agrarian reforms and aggressive standard of living programs. But he is also a very successful populist. He has charisma and grasped rapidly the importance of a television and radio presence. There is also something to be said about governance in the case of Castro. He made Cuba jump years ahead in education and healthcare. The country still maintains some of the world's best access to education and healthcare to this day, in spite of the state of the Cuban economy.
Some might argue that most, if not all, Communist-inspired revolutions removed an unpopular predecessor and they would be more or less right. But sometimes fate conspires in such a way with events that it's hard to think of anything but divine providence. For Cuba and it's new government, this would take the form initially in the inept and strong-handed reaction by the American government.
During the Batista era, it had been said that the American ambassador in Cuba was the second most powerful man on the island. The ambassador had incredible leverage over American aid, which in it's vast majority took the form of weapons, which Batista needed to keep himself in government. In turn, the ambassador would demand better conditions for American business. This, combined with the American-owned casinos, nightclubs and their attached businesses of bordellos and drug-traffic, contributed to a great extent to the belief in Cuba that the American government was at best indifferent to the plight of the Cuban public. At worse, it was hostile to it.
The United States vastly overplayed it's hand after the Cuban revolution with the landing at the Bay of Pigs. For the U.S., there were signs that Fidel could be dislodged. When Fidel took power, armed groups almost simultaneously rose up to remove him. He was popular with the public but he still had dangerous detractors but they nonetheless didn't amount to as much as the CIA thought they did. The problem here was that a lot of the information the CIA was getting about Cuba was from the Cuban exiles and they desperately wanted the United States to intervene. So, it goes without saying that they were ready and willing to reinforce CIA preconceptions.
I could try to explain just how badly the Bay of Pigs landing went but the Mitrokhin Archives has a particularly good quote on the subject which I will insert here: "It can scarcely have occurred to either Leonov and Semichastny (KGB chairman) that the CIA operation would end so rapidly in humiliating defeat. More than 1,000 prisoners captured at the Bay of Pigs were taken to a sports stadium in Havana where for four days Castro flamboyantly interrogated and harangued them on television. At one point, broadcast on TV news programmes across the world, the prisoners applauded the man they had come to overthrow. The abortive invasion served both to raise Castro's personal popularity to new heights and to speed Cuba's transformation into a one-party state. In front of cheering crowds at May Day celebrations of the Cuban victory over American imperialism, Castro announced that Cuba was now a socialist state which would hold no further elections. The Revolution, he declared, was the direct expression of the will of the people."
That event alone, had given Castro and Cuba an air of David vs. Goliath. It was now a case in the minds of the Cuban people of a small, new, Cuba standing up for it's rights and it's dignity against large, powerful Yanqui U.S.A. The popularity of the man leading the way soared to new heights.
Then came the missile crisis.
It might appear to be something that might not help Cuba, and the outcome certainly didn't. But the same cannot be said about helping the survival of the regime. Totalitarian regimes need a foil. They need to be able to survive by pointing at failings and say "Look, this is what (the bad guys) do to us!". It's true for Cuba, it's true for North Korea and they both use the same foil. While the missile crisis nearly ended in thermonuclear war, it thankfully led both the Soviets and the Americans to step back from the brink in favor of mutual exchanges of missile positions. But it did leave Cuba under an American embargo. In the year's since the crisis, the Cuban government has used time and time again the Embargo as the reason Cuba sometimes has food or goods shortages. It has served the regime well because it also fits well into the mythological narrative that the state pushes. It fit's into the struggle with the United States that goes back to Batista.
Fidel and the Cuban Communist party remain in power long after most of the world's other communist regimes have been overthrown or voted out because he managed his reputation well and caught the wind in his sails when world politics were blowing his way. He also had the good chance of having the United States severely bungle an important operation at just the right time to cement his hold on power. Finally, the Cuban communist party is responsible, both in reality and in the minds of the Cuban public, for some great advances in some areas where Cuba had been seriously behind before they too power.
Before the revolution, before his job became to professionally dish on America's role in the world, Fidel was said to be a fan of the United States. Hell, he believed that the United States would support the removal of Batista. I can't help but wonder if in his private moments, Fidel doesn't thank the United States for it's mistakes that made him into the longest serving politician of the 20th century.
Sources:
The Mitrokhin Archive by Andrews and Mitrokhin. My Life: A Spoken Autobiography by Fidel Castro Castro and the Cuban Revolution by Leonard The Cuban Revolution: Origins, Course, and Legacy by Perez-Stable
tl;dr: This is /r/askhistorians you should read it all. But yeah, the Americans did it.
The other thing to keep in mind when discussing this regime is that the same men who helped create it are still at its head. They have a tremendous amount of ... I'm not sure the right word -- credit, legitimacy, something like that ... with the people in general. These folks were there from the start, did things that were daring and, in some regards new, and cultivated a public perception of themselves as larger-than-life. They're still the guys at the top. What will be interesting is seeing how well the government structure holds up without the cachet of the Castro brothers.