You gain experience based on damage done. The difficulty slider affects damage output from you and your foes. Your enemies will has the same amount of health regardless of the difficulty you're playing on. The potential skill gain from a specific foe is the same on all difficulties. Technically, playing on the easiest setting would level you up the fastest because you do more damage faster, aka gain experience faster.
This is exactly the opposite of what I found in my testing.
Given the same weapon, same skill level, and same opponent, each hit you inflict on your opponent yields the same amount of experience points in Novice, Adept or Master. The difference between different levels of difficulty is that for each hit, the amount of health lost is adjusted. When you are in Novice mode, the opponent takes double the amount of damage. When you are in Expert mode, the opponent takes half the amount of damage.
Blocking experience works the same way, given the same opponent and the same type of attack, each hit you block with your shield results in the same amount of experience gain whether you are in Novice, Adept, or Master. The difference between different difficulty level is the amount of health lost to the attack. The amount of health lost is halved when you are in Novice, and doubled when you are playing in Master difficulty level.
So, to clarify. If I'm playing normally and want to increase my experience faster, I would choose to play in Master difficulty, because each battle will last longer. I would need to hit my enemy more times to kill him, and during that time I would get hit more.
But if I wanted to increase my blocking skill quickly, I would set the difficulty level to Novice and go to a giant camp and block and heal. Getting hit by the giant would give me the same experience as in Master level but I would be able to take more hits, and have lower chance of dying meanwhile.
You do not gain experience based on damage done. Your experience gain only depends on the type and base damage of your weapon. A Legendary Steel Sword will give you less experience than an unsmithed Daedric Sword. Enchanted gear and fortify potion will not change the amount of experience gained per hit. But for most people it will seem like you gain more experience when you do more damage, because most players will switch to better class of weapon as well as increasing smithing improvements and gaining skills and getting better enchantments all at the same time.