Titanium dioxide (which isn't the same thing as the metal titanium) is an inert, insoluble material that's used as a whitener in everything from paper and paint to plastics. It's the active ingredient in many mineral-based sunscreens. And as a pigment, is also used to make food products look more appealing.
Part of the appeal to food producers is that titanium dioxide is a pretty dull chemical. It doesn't dissolve in water. It isn't particularly reactive. It isn't easily absorbed into the body from food. And it doesn't seem to cause adverse health problems. It just seems to do what manufacturers want it to do – make food look better. It's what makes the powdered sugar coating on donuts appear so dense and snow white. Titanium dioxide gives it a boost.
And you've probably been consuming it for years without knowing. In the US, the Food and Drug Administration allows food products to contain up to 1% food-grade titanium dioxide without the need to include it on the ingredient label. Help yourself to a slice of bread, a bar of chocolate, a spoonful of mayonnaise or a donut, and chances are you'll be eating a small amount of the substance.