High or low cals in if you want to lift heavy but other situations stop you from getting to the gym

I've read some advice to lift heavy you need to eat high calories, but when a persons aim is to lift heavy but circumstances interfere with immaculate attendance at the gym, should you eat at deficit on days you can't go and high on days you do get to go, but will the low cal days make you too weak to lift? Does this make sense? I don't want to get fat from too many cals if I couldn't get to the gym sometimes.