I think Red is considered the greatest trainer because when he appears as an NPC he tends to be the ultimate challenge in the game. There has never been a game (yet) in which you fight Gold as an NPC, so it's really not "canon" how good of a trainer Gold is.
Red and Cynthia are the two strongest (non-player) trainers in the mainline games, by the numbers. Cynthia's team is slightly higher average level, and has perfect IVs/EVs. But, if you want to argue lore, I'd say it's either N or Volo - the two trainers that have legendary pokemon on their team.
. tyl2222pkl.pages.dev/265tyl2222pkl.pages.dev/16tyl2222pkl.pages.dev/357tyl2222pkl.pages.dev/270tyl2222pkl.pages.dev/46tyl2222pkl.pages.dev/388tyl2222pkl.pages.dev/399tyl2222pkl.pages.dev/323
pokemon is red the strongest trainer