This is as true in the gym as it is almost anywhere else. Persistence is more important than fancy equipment or perfect exercise and nutritional plans. It’s the key to success especially for those of us who train for life and not just for an event like a particular race or fitness competition.
Attitude is everything. You must avoid beating yourself up when you have a setback or your motivation flags for a while. If you can’t do your normal workouts, change your routine and do what you can. Perhaps you can only walk around the block. Maybe you can only manage some bicep curls or a little stretching. Fine. Just don’t quit.