I would like to share some of my thoughts on the problem. I think that the proposition is too hard to prove, and maybe it is even false, at this level of generality. However, there is an assumption on $T$ that makes the proposition true: it is the following Brezis-Lieb property (refers to Lemma 2.6 of Lieb, Sharp constants in the Hardy-Littlewood-Sobolev and related inequalities, Annals of Mathematics 1983).
Property. We say that $T$ satisfies the Brezis-Lieb property if, for all $g_n\in M$ such that $g_n\rightharpoonup g$, it holds that
$$\tag{1}\|Tg_n\|_p^p =\|Tg\|_p^p+\|T(g_n-g)\|_p^p+o(1).$$
Proposition. Let $\Omega$ be a measure space, let $p>2$, and suppose that the bounded operator $T\colon \mathcal H\to L^p(\Omega)$ satisfies the Brezis-Lieb property. Then $M$ is weakly closed.
Proof. Let $g_n\in M$, $g_n\rightharpoonup g$, and denote $r_n:=g-g_n$. Since $g_n\rightharpoonup g$ we have
$$\tag{2} \|g_n\|_{\mathcal H}^2 = \|g\|_{\mathcal H}^2 + \|r_n\|_{\mathcal H}^2 + \epsilon_n, $$
where $\epsilon_n\to 0$. Since $g_n\in M$, by the Brezis-Lieb property we have
$$
\tag{3} \begin{split}\|T\|^p\|g_n\|_{\mathcal H}^p&=\|Tg_n\|_p^p= \|Tg\|_p^p + \|Tr_n\|_p^p + \eta_n \\
&\le \|T\|^p\|g\|_{\mathcal H}^p + \|T\|^p \|r_n\|_{\mathcal H}^p + \eta_n,\end{split} $$
where $\eta_n\to 0$. Now, since $p>2$, for all $a\ne 0, b\ne 0$ we have the strict inequality $a^p+b^p <(a^2+b^2)^{p/2}$. So, assuming that all sequences converge, as we may up to a subsequence as they are all bounded, we have
$$
\|T\|^p\lim \|g_n\|_{\mathcal H}^p < (\|T\|^2\|g\|_{\mathcal H}^2 + \|T\|^2\lim\|r_n\|_{\mathcal H}^2)^\frac{p}{2}=\|T\|^p\lim \|g_n\|_{\mathcal H}^p,$$
where we used (2) in the last identity, provided that both $\|g\|_{\mathcal H}\ne 0 $ and $\lim\|r_n\|_{\mathcal H}\ne 0$. This is clearly a contradiction.
We conclude one of $\|g\|_{\mathcal H}$ and $\lim\|r_n\|_{\mathcal H}$ must vanish. If that's $\|g\|_{\mathcal H}$, that means $g_n\rightharpoonup 0$. If that's $\lim\|r_n\|_{\mathcal H}$, that means $g_n\to g$ strongly in $\mathcal H$. In both cases, $g\in M$. $\Box$
Remarks.
- This is the standard subadditivity argument used to prove the existence of extremizers; see for example Lemma 2.7 in the aforementioned paper of Lieb.
- The Brezis-Lieb property is a kind of compactness assumption on $T$. All compact operators trivially satisfy it, because $g_n\rightharpoonup g$ implies $Tg_n\to Tg$ strongly. Less trivially, all Sobolev embeddings satisfy the Brezis-Lieb property. Indeed, if $T\colon H^s\to L^p$ is the identity mapping, by the Rellich compactness theorem a sequence $g_n\stackrel{H^s}{\rightharpoonup} g$ converges $L^2$-strongly on balls, and so it converges pointwise almost everywhere; and now, if $g_n\to g$ almost everywhere, then (1) is satisfied by the standard Brezis-Lieb lemma. As far as I understand, this very idea has been used by Fanelli, Vega and Visciglia to study maximizers for inequalities in harmonic analysis: see 1 and 2.
- If $g_n\rightharpoonup g$ then $Tg_n\rightharpoonup Tg$, which, however, is not enough to conclude the Brezis-Lieb property (1). This paper of Adimurthi and Tintarev gives sufficient conditions for the Brezis-Lieb property to be satisfied with weak convergence alone.