The (fairly poetic and ill-formed) idea in this story is that the Kapustin-Witten story and the Langlands program are about the SAME four-dimensional TQFTs, but evaluated on different "manifolds" - i.e., to get even more polemic, there isn't a separate "geometric Langlands" and "Langlands" but one general story evaluated in different settings. [There are more details available in the lecture notes from a class I taught last year linked to in this question https://mathoverflow.net/questions/284973/lms-lectures-on-geometric-langlands]
As Will Sawin explained, the spaces of automorphic forms and categories of smooth representations are the values not on 2- and 1-manifolds but on (would-be) 3- and 2-manifolds, while the geometric Langlands correspondence is primarily about the value on 2-manifolds -- the $C$ you speak of. One way to phrase this: KW study the reduction of the 4d TFT on $C$, which is a 2d TFT (the value on $\Sigma$ is the value of the original 4d theory on $C\times \Sigma$). Now we're in the more familiar realm of eg mirror symmetry. A 2d TFT has a category of boundary conditions (the "category of D-branes" or value on a point in the functorial language), which is what the 4d TFT assigns to $\Sigma$. KW interpret these categories (on the two sides of the correspondence) as the automorphic and spectral categories (A- and B-sides) of the geometric Langlands correspondence.
This matches local Langlands, which in this interpretation is also an equivalence of categories attached to 2-manifolds -- this agrees with the Fargues-Scholze interpretation of local Langlands as geometric Langlands on the Fargues-Fontaine curve. (One subtle note: the category attached to a local field on the automorphic side is not actually just the category of smooth reps of G, but a much bigger category containing smooth reps of all pure inner forms of G and a family of smaller groups attached to so-called G-isocrystals -- this is essential to match the spectral side, where coherent sheaves on stacks of Langlands parameters are very large categories even for $\mathbb G_m$..)
In the work with Sakellaridis and Venkatesh we study the arithmetic counterpart of the work of Gaiotto and Witten on boundary conditions in the 4d theory and the effect of Langlands duality on them. As you say the point is that period functionals on automorphic forms appear in this dictionary -- they're the values of the theory on a "4-manifold" of the form [global field] x interval, where one end of the interval is marked by a spherical variety for $G$. As Will Sawin explained, the trace formula also appears naturally as the value on a 4-manifold (product with a circle).