From the wiki:
What counts as "taking damage?"
- Getting hit by an enemy, enemy projectile, bomb (pretty much what you would expect)
- Purchasing an item from the Devil Room.
- Using a "Health Up" pill.
What doesn't count as "taking damage?"
- Using the Blood Donation Machine or IV bag.
- The "Bad Trip" Pill effect.
- The Kamikaze! item.
Sadly, only one of your two examples is explicitly covered above, though I'd imagine the curse room falls under the very first bullet of "taking damage", along with the spike room (I'd try this myself but actually managing to take no damage is incredibly difficult, more so when you have to keep track of meta-game things).
Also, the wiki doesn't say anything about newer "sacrifice your health items", such as the Razor or Blood Rights. I've never used these items myself and qualified for one of the achievements, so I cannot attest to whether or not they count as damage (if I had to guess, I'd say no as per Kamikaze!).
Finally, the bit about the "Health Up" pill seems strange, but I've never paid specific attention in order to verify this (and setting this up is quite difficult).