It’s been debated a lot in the anime (mostly between Ash and Dawn in DP 004 when Nando couldn’t decide what to do).
To me I’d say Contests are more difficult because you have to compete in contests against dozens of other coordinators to win 1 ribbon. But in Gyms you only need to defeat the Gym Leader. Not only that you have to do 2 rounds of appeal; the 1st is like Show and Tell and only a handful make it to the next round which is taking your battle strategies and appeal style into consideration trying to steal points and not only that…you have a TIME LIMIT!!
If you lose in the 1st round or 2nd round that’s it its over there is no rematch until that city has a contest next year. In terms of gyms, you can just come back to the gym anytime (if the leader is there) and re-challenge them.
Yes, there are only a minimum of 8 badges to get for a league, but still sometimes coordinators go to probably a dozen or more contests just to get 5 ribbons.
Then around GF time, you are up against a lot more people but the stakes are higher because you have to have you’re A-game on. Just like a league, one lose and you’re gone. But I’d feel more pain from losing at a GF than a league.
Which path do you think is more difficult to pursue Contest on the road to the GF or Gym Battles on the way to the Pokemon League?