In my opinion, one of the strongest classes vs a ranger is a paladin - flamestrike easily blinds even level 50 or 51 pets, polearm is a staple paladin weapon and one of two that rangers don't have, and paladins have the melee defense to ignore the pets and the curatives/melee to outlast the ranger. The only real weakness of a paladin is the vulnerability to laglock, which a ranger can't really take advantage of.
With casters... it depends on the caster you're fighting. A bmg will usually wreck rangers, a necro depends heavily on who is using better pet management, and vs an invoker depends a lot on whether firestorm blinds the pets and if the invoker's blind.
This being said... as someone who has never pinned a ranger, I do have the feeling that beastmasters are a little bit weaker than the others, simply because the extra raven at 50 means almost nothing (lack of ranger expertise: if they can have an extra mammoth/leopard/etc. and I'm just wrong, ignore this). Even the classes that can't reliably block the extra melee damage don't suffer much due to how weak it is, and (I'm pretty sure this is a beastmaster trait, but correct me if I'm wrong) the area scan is only useful if you're already outdamaging your opponent (I'd be happy to wager that the time it takes a beastmaster to use and take advantage of this ability gives the opponent enough time to counter the advantage through movement/healing/recalling - something I would not necessarily apply to the tracker's hunting abilities).