Paint
Basically rust is etched with Muriatic acid (a.k.a. Hydro-Cloric Acid) or Phosphoric acid (naval jelly), then the tank needs to be flushed with hot water with baking soda to neutralize the acid and then the tank is to be sealed inside using Kreem, or POR-15 coating. The latter apparently is good for really rusty tanks, it seals pinholes.
Muriatic acid acts fast (~10 minutes) on both rust and metal, it leaves bare metal which will rust again (hence need for coating). Can be found at Home Depot (Garden department).
Phosphoric acid is much slower, it leaves behind a smooth coating of iron phosphate over the iron, which does not rust easily, and is easily coated (e.g. with gas tank epoxy). The coating is brittle, but that doesn't really matter inside a fuel tank. Roughly the procedure looks like this: "The tank should sit for 1 to 2 days with the phosphoric acid in it to clean it. It's not nearly as fast acting as the muriatic acid. After washing the tank out with water (and baking soda), I rinse it a couple of times with a gallon of denatured alcohol (from Home Depot) to get rid of the water."
For more read this topic.
Alternative to acid is electrolysis..