Cyber-attacks can degrade the performance of online transient stability prediction (TSP) and assessment functions offered for power systems. This paper proposes a cyber-resilient real-time TSP framework created by considering both perspectives, of the attacker, and of the smart grid operator. From the attacker’s viewpoint, to minimize the attack cost, a model-free data-driven algorithm for finding the measurements to which the TSP function is vulnerable is considered. The attack vector that maximizes the TSP classifier’s inaccuracy reduces the performance of TSP significantly. From the perspective of the system operator and to defend the system against data integrity attacks, two unsupervised learning algorithms which are principal component analysis and fuzzy c-means clustering, are combined and employed to detect the falsified phasor measurement units (PMUs) in the system. In the proposed framework, a denoising autoencoder model is also developed to eliminate the effect of stealthy cyber-attacks. When a cyber-attack is detected, the denoising autoencoder-based model is triggered to recover the damage of the cyber-attack, while a well-tuned long short-term memory model is implemented for the TSP application. The proposed framework is tested on two IEEE test systems, including 39-bus and 127-bus systems, with various attack scenarios. Results show that the developed system is more resilient to the attacks than the existing well-established TSP functions.