Looking into the exception details it looks like you are using SharePoint Online and not On-premise SharePoint. Please confirm if it is correct?
If you are using SharePoint online, then there is no gateway needed. I was able to repro the issue if my tenant doesn't have the valid SharePoint online subscription. Please make sure your tenant has a valid SharePoint online subscription.
To view whether your tenant has valid SharePoint subscription please navigate to https://portal.office.com/account/?ref=MeControl#subscriptions
Click on Subscription and see whether you are able to see Sharepoint license for the logged-in user on your tenant.
In PowerAutomate or LogicApps scenario connection is created before it is possible to know what tenant user is going to access so the only option defaults to the user’s home tenant as today. That is how it works today and there is no workaround. As of now, there is no way to access non-home tenants from PowerAutomate/LogicApps. I will reach out to my documentation team and add this in the document.
Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.