Hi team,
Could you please specify what license is required to use the on-premise data gateway in the flow?
From the link https://powerusers.microsoft.com/t5/Building-Flows/quot-Your-license-s-doesn-t-support-use-of-gateways-quot/m-p/142762#M14226,

I have tried to assign the following licenses which includes the "Flow for Office 365" to the user and got the following error "
Your license(s) doesn’t support use of gateways. To use this feature, start a trial." while saving a File System connection.
Microsoft 365 Business Standard
Office 365 E3