The following steps will help you to keep gym shoes from smelling:
Wash your feet often.
Wear the right socks and shoes.
Take your shoes off as soon as you are done with your workout.
Use sweat and smell reducing products.
Replace your insoles every 2-3 months.
Wash your shoes frequently.