It sounds like you may be running into an issue with the Power BI Desktop model exceeding the maximum size limit for the on-premises data gateway. The maximum size limit for a Power BI model that can be loaded through the on-premises data gateway is 2 GB.
To confirm if this is the issue, you can try the following:
Check the size of your Power BI Desktop model by going to File > Options and settings > Options > Data Load > Query Diagnostics.
If the size of your model is greater than 2 GB, then you will need to reduce the size of your model to be able to load it through the on-premises data gateway. You can do this by removing unneeded columns, tables, and measures, or by reducing the amount of data loaded into the model.
Another solution could be to split the model into smaller chunks, and refresh them separately.
If you're still facing the issue, try to clear the Power BI cache, as it might be possible that the issue is caused by corrupt cache data.
If none of the above solutions work, it could be an issue with the on-premises data gateway. You can check the gateway's log files for any error messages, or try restarting the gateway to see if that resolves the issue.
Keep in mind that the performance of the gateway might be affected by the complexity of the model, so try to simplify the model as much as possible.
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.