This happened to me today. It took 3 hours of trying everything I could to fix it and I wanted to share it so maybe someone else can be saved those hours. My solution is particular to my problem whereby I'm using impersonation to log into the server with a specific username and password.
In my case I had an SSAS tabular model with a connection to a remote Azure server. I am using Git on Azure DevOps for my source control and I had just moved over to a new development machine on our local network so I updated the remote repo with the latest version of the model, connected to the new dev machine and cloned the repo there. Then I tried to resume my work, but I was getting the same error you were: "OLE DB error: OLE DB or ODBC error: A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible..." blah.
Anyway, I tried resetting the SSAS services, changing the connection provider, rolling back to a previous commit that I knew worked, etc. Nothing worked.
The problem was my impersonation settings!!! I have SSAS_Data_Model credentials created for this project so when I cloned the repo, for some reason the impersonation must not have come through with the password.
So, in Visual Studio, go to Tabular Model Explorer, click on Model -> Data Sources, Edit Connection -> Impersonation... -> and under 'Specific Windows user name and password', you need to re-enter the password for your username. This finally got it working again and I can import tables into my model once more.