VMware NSX
VMware NSX-T Data Center
You need to remove the configuration or objects associated with the Tier-1 or Tier-0 gateway prior to removing them.
This could be segments, interfaces, load balancers etc.
After you have done that, you will be able to remove the Tier-1 or Tier-0 successfully.
If you are removing Edge nodes, refer to: Remove NSX Edge Nodes from an Edge Cluster