The repair anvil is used to repair your gear. Gear is slowly damaged over time from battles, or more significantly so from death in battle.
The more damaged and higher level your equipment is, the more expensive the repair will be. If your item is completely worn out, it will no longer function until repaired.