Don't confuse the Grappled condition with the "grappling" attack option.
When you want to grab a creature and hold on to them, the "grappling" attack option is how you accomplish that. The rules for doing this include a size limit on the target. If you succeed, you apply the grappled condition to the target.
But the size limit is a function of the grappling attack, not a rule that applies generally to the grappled condition. A condition is what it is, as defined in the rules appendix A (PHB p.290).
Spells, feats, magic items, or monster special actions may provide other ways to inflict the grappled condition without using the "grapple attack" rules, and therefore have no inherent size limits; the spell, feat, item, or action will specify what limits, if any, apply to it.
So yes, in theory, a giant frog could grapple an ancient dragon and stop it in its tracks. As a DM, you should feel free to overrule this if you feel it's absurd, but it's technically what the rules say.