I recently played a match and ran up against Twitch the Plague Rat, which seemed to do incredible amounts of damage over time.
Is there a good way, perhaps based on items, to counter damage over time in League of Legends?
Countering damage over time, like any other damage, depends on largely what kind of damage you are taking. If, for example, you are being hurt by Teemo's Toxic Shot, then you'll want to get items with magic resist. If Talon's Noxian Diplomacy is your bane, then you'll want to build more armor. Health is also a solid option if you have problems with both and you'll want to build some health anyways to enhance the effects of increased armor and/or magic resistance.
Unfortunately, building more magic resist or armor will not help against Twitch's damage over time. Twitch's Deadly Venom deals true damage, which ignores all damage reduction from armor and magic resistance. Therefore, your only option is to build more health.
Your other option is find a way to remove the damage-over-time effect, which can only be achieved through the Quicksilver Sash or its upgrade, the Mercurial Scimitar. While the summoner spell Cleanse can clear crowd control debuffs, it will not remove most damage-over-time effects as they are typically not tied to crowd control effects.
DoT are a kind of sustained damage, as opposed to burst damage.
In the end it's less about wheter you die or not, but more about how long you survive against sustained damage, for this all forms of healing help including health regeneration. Shields also help, such as that from Janna, Lulu, Tresh, Lee Sin or Shen.
Note that health regeneration, shields and heals are more effective on champs with heavy Magic Resist or Armor, since they heal the same no matter how much health you have.
Personally I found "Crystaline Flask" and "Spirit Visage" to be most effective, Crystaline Flask due to it's laughable cost, Spirit Visage due to the massive health regen + additional Magic Resistance.
For AD Carries life steal is also tremendously effective against any form of sustained damage.
If you play a Assassin health might be helpful too, so that you can get away after bursting someone with DoTs.