I got a similar error when trying to replace the Personal Gateway with the Enterprise Gateway. I had both configured on the machine and all datasets were using the PG. I added equivalent data sources to the EG and they were working OK. I then switched from the PG to the EG on alla datasets but now got a generic "unknown error in Enterprise Gateway" error code -2147467259. If I stopped the PG service (also set it to manual to prevent it from autostarting if server reboots) everything was working OK. It seems that you cannot have both running at the same time although several MS articles say that this should be possible. When chatting with Power BI support they have also said that the PG is going away soon.