Mailgun absolutely works with Discourse routing to Gmail, it’s one of the most common configurations.
Do you have a g suite account on the same domain? Does discourse route from a separate subdomain, or one which has MX records configured for inbound mail relay to another provider?
This is very likely to be DNS related.