To clarify, the thing one eliminates is typically a molecule or a food group--the most common are probably (in no order) added sugar, gluten, fried foods, processed foods, dairy, and red meat. One can eliminate any or all of those, typically for a month (gives your gut time to change), and then, if you want to, experiment with adding things back in.
A nice thing about the gut microbiome is that it's self-reinforcing, both psychologically and gustatorily--as in, once one's body realizes a food doesn't help, one tend to both think "why would I make myself feel like that?", and to find the experience of eating/drinking it less pleasurable, alien, or even disgusting.