Confusion regarding definition of gauge transformation Let $E \to M$ be a principal $G$-bundle.
The gauge group is the group of $G$-bundle automorphisms of $E$.
A connection on $E$ can be thought of as a global $g$-valued 1-form on $E$ where $g$ = Lie$(G)$.
Then given a connection $A$, I've been told that a gauge transformation $h$ acts on it by the equation :
$h.A := hAh^{-1} + hdh^{-1}$

I don't understand this equation. My output should again be a $g$-valued 1-form. How do I see the RHS as such a thing?

Independently for vector bundles we have covariant derivative which takes sections of $E$ to sections of $E \otimes T^*M$. There a gauge transformation (ie a vector bundle automorphism) $h$ can act by sending a section to $h.\nabla(h^{-1})$

How do the two notions come together?

 A: I answer the second question as the first one was appears to be answered in the comments.
So a gauge transformation $f$ on a principal-$G$-bundle $\pi:P\to M$ is a $G$-bundle isomorphism, that is a diffeomorphism $f:P\to P$ which is fiber-preserving, $\pi\circ f=\pi$, and $G$-equivariant. They form a group, so denote
$$
\mathcal{G}(P)=\{f:P\to P|f\text{ is a gauge transformation}\}.
$$
Given a vector bundle of the form $E=P\times_{\rho}V$, that is, a vector bundle which is associated to $P$ via the representation $\rho:G\to\text{GL}(V)$, then one can study the homomorphism of groups
$$
T:\mathcal{G}(P)\to \text{Aut}(E),~\big(T(f)\big)((p,v).G)=(f(p),v).
$$
Here a point in $E$ is defined to be the $G$-orbit $(p,v).G$ in $P\times V$ via the action $(p,v).g=\big(p.g,\rho(g^{-1})(v)\big)$.
You can show that it is well-defined an indeed a homomorphism. Automorphisms of $E$ in the range of $T$ are called gauge transformations of $E$. $T$ has the nice property that it is injective/surjective if $\rho$ is injective/surjective.
Now you can look what gauge transformations do to connection forms on $P$ and to covariant derivatives on $E$. First note that for each connection form $A\in\Omega^1(P,\mathfrak{g})$ you obtain a covariant derivative $\nabla^A$ on $E$. Moreover, for a connection form $A\in\Omega^1(P,\mathfrak{g})$ also the pullback $f^*A\in\Omega^1(P,\mathfrak{g})$ is a connection form. The homomorphims above is now made just the way that
$$
\nabla^{f^*A}=T(f)^*\circ\nabla^A\circ T(f^{-1})
$$
holds. This formula is what I guess that you mean by your formula $h.\nabla(h^{-1})$, is it?
If you now start from some vector bundle $E$, it is always associated to its frame bundle $\text{GL}(E)$ in the above sense, that is $\text{GL}(E)$ is now a principal-$\text{GL}(V)$-bundle and $E$ is associated to $\text{GL}(E)$ via the trivial representation $\text{id}:\text{GL}(V)\to\text{GL}(V)$. For a covariant derivative $\nabla$ on $E$ you obtain a connection form $A^\nabla$ on $\text{GL}(E)$ such that the covariant derivative you obtain from $A^\nabla$ is $\nabla$ again. Now you can use the above formula as well.
However, the above formula is what a gauge transformation does to a covariant derivative. Applying a gauge transformation in turn to a section in $E$ does not involve any covariant derivative (other that in specifying what a "gauge transformation" is, cf. below), it is just the (pointwise) application of the automorphism to the section.
One important thing you seem to oversee in your second question is that, a priori, a gauge transformation does not really make sense for a vector bundle and you should always mention the gauge group you regard for your gauge transformation. You may well consider any automorphism of $E$ as a $\text{GL}(V)$ gauge transformation (recall that $T$ above is surjective if $\rho$ is, and $\text{id}$ certainly is), but then we already have the name "automorhphism" for it and it is not obvious what it has to do with a gauge.
Moreover, usually one is interested in a smaller gauge groups, e.g. if $E$ is hermitian, then you just just want the $\text{U}(N)$- or $\text{SU}(N)$-transformations or alike. For these cases you can construct another principal-$G$-bundle $P$ form $\text{GL}(E)$ (keyword gauge reduction) such that $E$ is again associated to $P$ and the range of $T$ as above consists exactly of the right transformations you want (if you want something sufficiently nice...). But then an arbitrary automorphism of $E$ is not a gauge transformation anymore.
