My understanding is that it can take anywhere up to 2 days for a small amount of gluten to leave the body, but the effects it may cause to your body can last longer. It would depend how susceptible you are. Some people react more violently to small amounts of gluten than others. My son vomits when he accidentally eats gluten, but some people do not have any outward reaction to small amounts. Of course it can still be causing havoc with your insides unbeknownst to you.
I'm celiac and often after accidently ingesting gluten or being too careless I offen suffer intense depression for days to follow. Also with other symptoms such as lethargy and skin innormalities. The symptoms should clear up should a strict no-gluten diet be aheared to after a few days and completely gone after a week or so