Centralizers of arbitrary elements in a general linear group (over an arbitrary algebraically closed field) are connected for an easy reason: the centralizer in the space of $n \times n$ matrices is just a subspace, while the centralizer in $GL_n$ is a principal open set in this affine space (nonzeros of the determinant polynomial) and hence also connected.
Symplectic or other semisimple groups require a much more subtle approach, though there may well be a fairly direct approach in the symplectic case (at least in characteristic 0). A basic theorem due to Springer and Steinberg states: In a connected and simply connected semisimple algebraic group, over an arbitrary algebraically closed field, the centralizer of every semisimple element is connected. This theorem is still waiting for a really transparent proof, but it's written up in Chapter 2 of my 1995 AMS book Conjugacy Classes in Semisimple Algebraic Groups following Steinberg's papers and Tata lecture notes. (For the general linear case above, see 1.2 in that book.)
P.S. Maybe I should emphasize that I'm using algebraic group language, in the spirit of the tag here, so that a closed connected subgroup corresponds to having an underlying irreducible affine variety structure: the regular functions form a domain. Over $\mathbb{C}$ this notion of "connected" agrees with the topological one (and similarly the algebraic notion of "simply connected" agrees with the topological one in the case of semisimple groups), as shown by Chevalley and Borel. But working over $\mathbb{R}$ is more complicated.