How can I overwrite in my portal extension the groovy template [portal]/groovy/portal/webui/workspace/UIPortalApplication.gtmpl
You need a template in your extension defined with the same path. In your case, you must define UIPortalApplication.gtmpl in [your_extension]/groovy/portal/webui/workspace/