There's a good way to make sure you don't accidentally do that. Whenever you unlock a new class, immediately equip the gear you want for it and hit the plus button to create a new gear set. Whenever you update your gear set hit the button that looks like a reload button.

Any gear you have saved to your gear set will show up in your inventory with an icon that looks like a list. This icon means you are using that piece on some class or another, so don't get rid of it.