The U(1) Symmetry of the Standard Model is not with Electromagnetism
Rather, it is with the hypercharge field. The electromagnetic field cuts across both the U(1) and SU(2) parts of the Standard Model: it is a superposition of the U(1) field and one of the components of the SU(2) field. This means (1) technically, electromagnetism in the standard model is part of a non-Abelian gauge field (the electroweak field), (2) its classical field equations are therefore non-linear and inhomogeneous and (3) this revision both supersedes and falsifies classical electromagnetism.
So, when quantizing electromagnetism, quantum electrodynamics (QED) is no longer the correct result. Rather, it would be the hypercharge field that would be described by a "QED"-like theory. Instead, you have to quantize it as part of a non-Abelian gauge field, non-linearities, inhomogeneities and all. A consequence of this is that the electroweak field, itself, has electric charge - manifested by the force carriers, the W⁺ and W⁻ particles.
Generally, these revisions do not have any significant effect beyond the sub-atomic level, so in practice one continues to treat the electromagnetic field classically as a Maxwell field and in quantum field theory by QED.
Electromagnetism and Einstein
You have the history all wrong. Einstein did not "discover" the electromagnetic potentials. These come from Maxwell, as do the alphabet soup of names: 𝐀 for magnetic potential, 𝐁 for magnetic induction, 𝐂 = 𝐉 + ∂𝐃⁄∂t for total current, 𝐃 for electric induction, 𝐄 for electric force, 𝐅 for force density, 𝐆 for the velocity relative to the isotropic frame, 𝐇 for the magnetic field, 𝐈 for magnetization and 𝐉 for current density. The 𝐆 vector was not used consistently, but appears in all formulations, in some fashion or another, of electromagnetism for moving media. Lorentz used -𝐩 in his papers 1895-1904, Minkowski used 𝐰 in his 1908 paper, and Einstein & Laub used 𝐯 in theirs. Maxwell used 𝐯, in the treatise, in addition to 𝐆, even in the same section at places.
It was, later (notably with Hertz and Helmholtz) that the potentials and their related equations were disregarded and mostly ignored. So, by Einstein's time, one talked almost exclusively about the field strengths rather than the potentials. Einstein did not (re)introduce or use them in any of his early papers, nor did his contemporaries. In particular, they were not part of Minkowski's 1908 formulation of electromagnetic theory of moving media (in which he also introduced Minkowski geometry), nor in Einstein & Laub's papers on the formulation of moving media.
The electromagnetic potentials are required for a Lagrangian formulation of electromagnetism. I don't know when this first arose, but do know the following: (1) Maxwell discussed the Lagrangian and Hamiltonian formulations of mechanics in his treatise ... only for mechanics, not for fields, (2) no mention of any Lagrangian formulations for field theories is made in the 19th century or before the 1910's by Hertz, Helmholtz, Heaviside, Lorentz, Einstein that I can find, (3) it is used for Einstein's equations by 1915, as well as for the coupled Einstein-Maxwell equations in the 1910's.
Some of the early history is discussed here "On the analytical formulation of classical electromagnetic fields" https://arxiv.org/abs/1607.00406
According to this account, Minkowski was probably the one of the first to come up with the idea of using a continuum Lagrangian formulation for the field theory - in 1908. So, he might be the missing link.
Symmetries and Spacetime Geometry
Local Lorentz symmetry is not a symmetry of spacetime, when spacetime is modeled by a pseudo-Riemannian geometry. However, it is, when it is modeled by a Riemann-Cartan geometry, whose distinguishing feature is just that. It carries a representation for a locally gauged Lorentz symmetry, in the form of a frame field.
In order to even be able to talk about spinors (never mind, to actually do anything with them), you have to have a locally-gauged Lorentz symmetry there first. Riemannian geometries do not have sufficient infrastructure for this, therefore the additional infrastructure provided by a Riemann-Cartan geometries, as well as the geometries themselves, are mandatory and you can't use Riemannian geometries for anything that involves spinors and fermions.
It is a historical accident that General Relativity was formulated in Riemannian geometry, rather than Riemann-Cartan geometry. The latter simply did not arise until the 1920's, and a proper understanding of the role that symmetry groups played in Physics was still not fully developed at the time. Even non-relativistic physics required retro-fitting, with the expanded understanding (e.g. the concept of spin, the non-relativistic Wigner classification, etc.) later retroactively included in the framework. (So, technically, Newtonian physics is still an evolving field, still undergoing development, despite the fact that its role as a foundational field for physics has been superseded by Relativity.)
General Relativity was historically given by the Einstein-Hilbert action over [pseudo-]Riemannian geometries and its associated Lagrangian. It can be lifted intact into a Riemann-Cartan geometry, in which case it becomes equivalent to the Palatini action and Lagrangian.
One of the distinguishing features of Riemann-Cartan geometry is that it treats connections and metrics as independent objects and a connection need no longer be the Levi-Civita connection associated with the metric. The Palatini action forces the issue by constraining the connection to be Levi-Civita. When the constraint is removed, then the direct transcription of the Einstein-Hilbert action is the Einstein-Cartan action. This produces the same dynamics for exterior solutions, but couples to spin differently than the Palatini action does (I'm not sure Palatini even has any coupling to spin), and produces slightly different dynamics for interior solutions inside matter.
Both Palatini and Einstein-Cartan provide first-order formulations of gravity (the Lagrangians involve only first order derivatives), while Einstein-Hilbert is second order because the Levi-Civita connection is expressed directly in terms of the metric, so its derivatives are directly expressed in terms of second order derivatives of the metric.
One can also talk about locally gauging the translational symmetry of the Poincaré group. This leads to teleparallel geometries, and more generally to metric affine geometries in which frame fields are associated with the locally gauged translational symmetries, while the connection continues to be associated with the locally gauged Lorentz symmetries (boosts and rotations). Concepts that go with this are "rolling tangent" and "Cartan connection".
Some of these issues are discussed directly or tangentially here in nLab. Here's a small list to use as a launching point:
Cartan Connection: https://ncatlab.org/nlab/show/Cartan+connection
Teleparallel Gravity: https://ncatlab.org/nlab/show/teleparallel+gravity
First-Order Formulation of Gravity: https://ncatlab.org/nlab/show/first-order+formulation+of+gravity
Gravity Contents: https://ncatlab.org/nlab/show/gravity+contents
Lagrangians, Hamiltonians and Symplectic Geometry
Your characterization "L is T - V" is inaccurate and probably comes from scanning too many introductory discussions of the issue, where one tends to see "L = T - V".
The Lagrangian is a generating function that connects the kinematic or configuration variables of a system with its dynamical variables. Such a connection may be said to form a set of constitutive relations. So a theory or system has a description that may be stratified into two layers.
In the first layer, is the list of which configuration variables and dynamical variables are at play. Things are generic at this level, since any of a large number of different systems of dynamical theories can be devised with these objects. So, this might be called the "framework" layer, where the basic playing field is laid out.
In the second layer, a set of relations is provided that link the configuration and dynamical variables to one another. These are the constitutive relations and provide the basis for the dynamics specific to the given system or theory. Different systems and theories are distinguished from one another by which set of constitutive relations they have. So, this might be called the "theory" layer, where different theories are devised on top of the framework.
A Lagrangian (or any of its transforms, such as a Hamiltonian) provides a generating function that produces those constitutive relations.
For example, in mechanics, one has the configuration variables $𝐪 = (q^1,q^2,q^3,q^4,q^5,⋯)$, and their first order derivatives, their velocities $𝐯 = (v^1,v^2,v^3,v^5,v^5,⋯)$ that are related to one another by a kinematic law $𝐯 = d𝐪/dt$.
On the dynamics side, one has conjugate momenta $𝐩 = (p_1,p_2,p_3,p_4,p_5,⋯)$ and their corresponding forces $𝐟 = (f_1,f_2,f_3,f_4,f_5,⋯)$ that are related to one another by a dynamic law $𝐟 = d𝐩/dt$.
Together, that's the first layer of the description. It's generic and contains no empirical content other than the empirical supposition of physical relevance - that these variables are actually relevant to the system or dynamics being described and capture all of what needs to be accounted for in that description.
A Lagrangian $L(𝐪,𝐯)$ is a function of the $𝐪$'s and $𝐯$'s that generates the constitutive laws for the dynamical variables by
$$𝐩 = {∂L \over ∂𝐯}, 𝐟 = {∂L \over ∂𝐪}.$$
A Hamiltonian $H(𝐪,𝐩)$ produces a set of constitutive laws that link the kinematic and dynamic laws to the $𝐪$'s and $𝐩$'s
$$𝐯 = {∂H \over ∂𝐩}, 𝐟 = -{∂H \over ∂𝐪}.$$
They all have the property that they provide different implementations of the same differential equation involving a specific object, as you're about to see.
The differential equations for the Lagrangian and Hamiltonian can each be written as equations for first order differential forms:
$$dL = ∑_a (p_a dv^a + f_a dq^a),$$
$$dH = ∑_a (v^a dp_a - f_a dq^a).$$
In both cases, they yield the same second order differential equation
$$0 = d^2L = ∑_a (dp_a \wedge dv^a + df_a \wedge dq^a),$$
$$0 = d^2H = ∑_a (dv^a \wedge dp_a - df_a \wedge dq^a) = ∑_a (dv^a \wedge dp_a + dq^a \wedge df_a).$$
The equation, in question, is
$$∑_a (dp_a \wedge dv^a + df_a \wedge dq^a) = 0.$$
This, in turn, guides the creation of other generating functions that take different subsets of the variables as the independent variables. One might, for instance, take a mixture of some of the $𝐩$'s with some of the $𝐯$'s as independent variables, as well as picking out some of the $𝐟$'s and $𝐪$'s. For example, if one wanted a generating function $K(𝐯,𝐟)$ that takes the $𝐟$'s and $𝐯$'s as independent, then the corresponding differential equation would have to be
$$dK = ∑_a (p_a dv^a - q^a df_a),$$
or
$${∂K \over ∂𝐯} = 𝐩, {∂K \over ∂𝐟} = -𝐪.$$
These are all related to one another by Legendre transforms, here: $H = 𝐩·𝐯 - L$ and $K = L - 𝐟·𝐪$.
The object involved in the differential equation may, itself, be thought of as a total time derivative of another object
$$ω = ∑_a (dq^a \wedge dp_a)$$
called the symplectic form. The equation, itself, can be rewritten as
$${d \over dt}ω = ∑_a \left({d \over dt}dq^a \wedge dp_a + dq^a \wedge {d \over dt}dp_a\right) = ∑_a \left(dv^a \wedge dp_a + dq^a \wedge df_a\right) = 0.$$
Technically, the "$d/dt$" operator is actually a Lie derivative (and would be more correctly written as $ℒ_{d/dt}$, with manipulations such as $ℒ_{d/dt}dq^a = d(ℒ_{d/dt}q^a) = dv^a$ and $ℒ_{d/dt}dp_a = d(ℒ_{d/dt}p_a) = df_a$ following from the basic properties of Lie derivatives). The $d/dt$ operator expresses the flow of time for the system - time translation. The equation $ℒ_{d/dt}ω = 0$ tells us that the system has time translation symmetry.
In mechanics, the classical example is a conservative system, in which one normally has a relation that expresses the momentum components as homogeneous 1st degree function of the system's velocities in terms of a symmetric matrix $M_{ab} = M_{ba}$ by
$$p_a = ∑_b M_{ab} v^b,$$
while the force law is given in terms of a potential $V = V(𝐪)$, by
$$f_a = -{∂V \over ∂q^a}.$$
If the mass matrix $M = \left(M_{ab}\right)$ is invertible to $W = \left(W^{ab}\right) ≡ M^{-1}$, then one can also express the velocity in terms of the momentum
$$v^a = ∑_b W^{ab} p_b.$$
You can verify directly that this respects time translation symmetry
$$0 = {d \over dt}ω = ∑_a (dp_a \wedge dv^a + df_a \wedge dq^a)$$
by direct substitution:
$$∑_a (dp_a \wedge dv^a + df_a \wedge dq^a) = ∑_a ∑_b \left(M_{ab} dv^b \wedge dv^a + {∂^2V \over ∂q^a∂q^b} dq^b \wedge dq^a\right) = 0.$$
since the wedge product is anti-symmetric $u \wedge v = -v \wedge u$, while the coefficients are symmetric. Therefore, these kinds of systems admit Hamiltonian and Lagrangian formulations, which can be found by direct integration.
The differential equations for the Lagrangian, upon substitution, are
$$dL = ∑_a (p_a dv^a + f_a dq^a) = ∑_a ∑_b M_{ab} v^b dv^a - ∑_a {∂V \over ∂q^a} dq^a = d\left({\frac 1 2} ∑_a ∑_b M_{ab} v^a v^b - V\right)$$
while those for the Hamiltonian are
$$dH = ∑_a (v^a dp_a - f_a dq^a) = ∑_a ∑_b W_{ab} p_b dp_a + ∑_a {∂V \over ∂q^a} dq^a = d\left({\frac 1 2} ∑_a ∑_b W^{ab} p_a p_b + V\right).$$
That's actually where you get your $L = T - V$ and $H = T + V$ expressions from. They apply to the special case of conservative systems in mechanics, where the kinetic energy is a homogeneous function of second degree in the component velocities or momenta:
$${\frac 1 2} ∑_a ∑_b M_{ab} v^a v^b = T = {\frac 1 2} ∑_a ∑_b W^{ab} p_a p_b.$$