Brock-Brock's Onix had a major type advantage against Ash's whole team at the time, so Ash, with the help of Brock's father, Flint, supercharges Pikachu with a water wheel. He also got lucky when the sprinklers sprayed on Onix, effectively weakning him and acting as a conductor for Pikachu's electricity.
Surge-Pikachu is quickly defeated by its evolved form, and ash was offered a thunderstone by nurse Joy while tending to Pikachu's injuries. She told him that it would give Pikachu the power it needed to defeat Surge, but Ash felt he would be no better than Surge if he just evolved Pikachu to win, thinking it selfish of him, so he gives Pikachu the decision. Pikachu chooses not to evolve, and later defeats Raichu.
Sabrina- Sabrina's Abra (who evolves into Kadabra during the battle) defeats Ash, and to beat her, he befriends a Haunter, which helps him "defeat" her.
Blaine- Pikachu gets defeated by Magmar's fire blast, and ash Loses. He gains the chance to rematch him when he saves the volcano the gym is in from erupting. He gets Charizard to respect him enough to actually battle, and Charizard defeats Magmar.
Also, while battling Misty and Erika, the battle was interrupted, and he earned the badges by saving the gyms, rather than beating the leaders. (for instance, Erika gives him a badge as thanks for saving her Gloom from a fire)
Whitney-Ash's Cynadquil sweeps two of her Pokemon very easily, but then has his entire team defeated by her Miltank's rollout. He later comes up with a new strategy and beats her.
Brawly-Ash's team loses, and so he trains even harder with Treecko to improve his technique. This is also where Pikachu learns Iron tail.
Also, Ash did rematch Wattson later on-not because he lost, but because his Pikachu won due to it being supercharged by a mechanical Raikou. He felt a fair match was in order.
Roark-Ash loses against his rock Pokemon, and later wins in a rematch.
Gardenia-Ash wins in the official gym match, but they do have a practice battle beforehand, which he lost, so you might consider that a rematch.
Maylene-This one isn't a rematch, but Ash has the match end in a draw between his Buizel, and Maylene's Lucario.
Fantina-Ash loses to the gym leader/coordinator pretty quickly, but beats her in a rematch, by developing a defense technique known as "counter shield."
Aunt Jemima-Ash lost to her pretty quickly, and won in a rematch.
He's already got four badges, and has yet to battle the last four gym leaders, so we can't really say anything about them yet.