First letLet me assume only that $G$ is a connected Lie group because it's more flexiblesimple connectedness does not seem to play any role. Then clearlyClearly the question does not change if we mod out by the unit component of the kernel of the representation, so we can suppose that the representation has a discrete (hence central) kernel.
So now we have: a connected Lie group $G$, a continuous homomorphism $j$ with discrete kernel and Zariski-dense image into a real connected linear algebraic group $L_a$, a Zariski-closed subgroup $H_a$ in $L_a$, and we wish to understand the group of components of $j^{-1}(H_a)$. The group of real points of $L_a$ has finitely many components in the Lie topology; let $L$ be the unit component, and let $H=L\cap H_a$. Since $j(G)\subset H$$j(G)\subset L$, we have $j^{-1}(H)=j^{-1}(H_a)$.
Since $j(G)$ is Zariski dense in $L$, its Lie algebra is an ideal in the Lie algebra of $L$ with abelian quotient. In particular (by Zariski connectedness of $L$) its Lie algebra is normalized by $L$, and thus by connectedness of $G$, we obtain that $j(G)$ is normal in $L$ with abelian quotient $(*)$. In particular, the derived subgroup $L'$ of $L$ (viewed as the group of real points) is contained in $j(G)$. (This derived subgroup has finite index in the group of real points of the algebraic group $L$$[L_a,L_a]$.)
Let $p$ be the projection $L\to L/L'$. Then $L/L'$ is an abelian virtually connected Lie group; $p(H)$ is closed in $L/L'$; the image $p\circ j(G)\subset L/L'$ is a connected immersed Lie subgroup, and hence $(p\circ j)^{-1}(p(H))/\mathrm{Ker}(p\circ j)$, as a closed subgroup of a connected abelian Lie group, is isomorphic to the direct product of a connected abelian Lie group and a free abelian group of finite rank.
By definition, we have $\mathrm{Ker}(p\circ j)\cap j^{-1}(H)=j^{-1}(L'\cap H)$, which equals $j^{-1}(L')\cap j^{-1}(H)$. Recall that $L'\cap H\subset L'\subset j(G)$, so its Lie algebra is the image by $j$ of some Lie subalgebra of the Lie algebra of $G$, generating an immersed subgroup $M$. Then $j(M)$ is the unit component of $L'\cap H$ (in the Lie topology), so $j^{-1}(L'\cap H)$$\mathrm{Ker}(j)M$ has finite index in $\mathrm{Ker}(j)M$$j^{-1}(L'\cap H)$.