Ash gets the Badge in Episode 26: Pokemon Scent-Sation.
Source: Bulbepedia Hope this helps you out :)