I've got the same problem since aprox a week, but specific via Dynamics CRM Online. Without using a gateway at all. Maybe the problem is not gateway specific (?) I escalate to Microsoft.
For example: I'm not able to change my credentials for scheduled refresh without the error warning: Failed to update data source credentials".
Please, to everyone having this issue, please see these posts. I am having the same exact issue: fail to refresh with new datasets pulling data through Web.Contents() because PowerBI Service says credentials are invalid (when they are not). And even though it returns status code = 200 (status: SUCCESFUL) it fails.
Please Microsoft fix this since ALL my datasets are setup like this, pulling data from OneDrive for Business resources through Web.Contents, OAuth2 e Scheduled Refresh.
I'm affected by this as well. I have several datasets linked to Dynamics CRM OData using OAuth2 and its wierd that some of the datasets are refreshing ok and only a few are affected by the issue. Please see the screenshots below
Done a lot of googling and searches on Power BI forum, tried upgrading desktop software and republishing the reports, clearing browser cache, etc. but nothing seem to have worked.