D.W.
Chances are, the item in question was left in the washer too long causing mildew to grow. Just washing it will seldom remove the smell. It tends to be worse in the summer when it's humid, and we sweat.
The things that appear to have worked the best for us are: vinegar in place of bleach in the rinse cycle. Your clothes will NOT smell like vinegar (cheap white vinegar will do) or baking soda.
Some of our towels are beyond hope and will have to be thrown away or used for the dog. You can Google the Queen of Clean, and she usually has great advice.