Injuries come in various shapes and sizes. Minor injuries don't necessarily need to keep us out of the gym. I offer you 3 steps to staying motivated through minor injuries.
The first thing you need to do is an assessment of the injury. You have to determine if it is severe enough to change up your training routine. I recently had an ankle injury. It was extremely minor. I did an assessment by wrapping it in a bandage for support and then did some test squats with lighter weight. Upon determining that I was able to squat with the injury I continued to complete my program.
It is important for you to do an honest assessment. You can use the results to make modifications to your lifting program so that you don't have to miss out on valuable gym time. There are always adjustments that can be made.
Once you've done your assessment you have to make adjustments if required. The idea is to keep the gym momentum going. You do this by adjusting your program. Had I determined that I could not have done squats I would have adjusted so that my quads would still get worked but not irritate the ankle. It might take some thought and some ingenuity, but the adjustments can be made.
Once you have done an assessment and made adjustments, it is time to perform. Pay close attention to the way your body feels as you perform. If there are problems it may mean starting the process all over with the assessment phase. The main thing is to listen carefully to the feedback your body gives you. It is going to mean the difference between successfully navigating through the minor injury and making things worse. Don't be lax about this step.
By following the above 3 steps you have a good chance of working through the minor injuries we all suffer. Remember that if all else fails, consult a doctor.