Unfortunately it may be a bit outclassed by Gurdurr, but who knows, Gurdurr might move up from usage or something.
The niche yama has over gurdurr is being able to stop fire spam in its tracks & being able to tank special hits. Yama is a fantastic check to fire spam, as it can tank special hits and then KO with close combat and priority.
252 SpA Choice Specs Typhlosion Eruption (150 BP) vs. 0 HP / 128 SpD Assault Vest Thick Fat Hariyama: 136-162 (31.7 - 37.7%) -- 90.8% chance to 3HKO
252+ SpA Life Orb Magmortar Fire Blast vs. 0 HP / 128 SpD Assault Vest Thick Fat Hariyama: 105-125 (24.4 - 29.1%) -- 99.6% chance to 4HKO
252 SpA Choice Specs Pyroar Fire Blast vs. 0 HP / 128 SpD Assault Vest Thick Fat Hariyama: 100-118 (23.3 - 27.5%) -- 69.8% chance to 4HKO
252 SpA Choice Specs Pyroar Hyper Voice vs. 0 HP / 128 SpD Assault Vest Hariyama: 163-193 (37.9 - 44.9%) -- guaranteed 3HKO
252+ Atk Hariyama Close Combat vs. 4 HP / 0 Def Typhlosion: 250-295 (83.8 - 98.9%) -- guaranteed 2HKO
252+ Atk Hariyama Close Combat vs. 4 HP / 0 Def Magmortar: 282-333 (96.5 - 114%) -- 81.3% chance to OHKO
252+ Atk Hariyama Close Combat vs. 4 HP / 0 Def Pyroar: 534-630 (170 - 200.6%) -- guaranteed OHKO
Granted, it can't switch in multiple times on fire spam, as it loses a big chunk of its HP each time it switches in. That said, it is a great check to fire spam as it can take a hit & KO with priority + close combat.
Gurdurr's niche, on the other hand, is being able to repeatedly take physical hits, recover back lost hp with drain punch, and become a formidable bulky set up sweeper with bulk up. I don't believe one is outclassed by the other.