Homotopy classes of maps from $S^1$ to the Grassmanian $G_n(\mathbb{R}^{\infty})$ We consider that $\text{Vect}_n^{\mathbb{R}}(X)$ denotes the set of isomorphism classes of $n$-dimensional real vector bundles over $X$ - see page 18 of Hatcher's Vector Bundles and K-Theory. Moreover, we let $[X, Y]$ denote the set of homotopy classes of maps $X \to Y$. Take $X = S^1$ and $Y = G_n(\mathbb{R}^{\infty})$. If we take $n=1$, then we obtain 
$$\operatorname{Vect}_1^{\mathbb{R}}(S^1) \cong [S^1, G_1(\mathbb{R}^{\infty})] \cong [S^1, \mathbb{R}\text{P}^{\infty}] \cong \pi_1(\mathbb{R}\text{P}^{\infty}) \cong H_1(\mathbb{R}\text{P}^{\infty}) \cong \mathbb{Z}_2.$$ 
I'm confused about how to do this for general $n$ however. 
 A: First of all, you wrote $[S^1, \mathbb{RP}^{\infty}] \cong \pi_1(\mathbb{RP}^{\infty})$. This is not immediate because the left-hand side denotes the collection of homotopy classes of maps $S^1 \to \mathbb{RP}^{\infty}$, while the right-hand side denotes the collection of base-point preserving homotopy classes of maps $S^1 \to \mathbb{RP}^{\infty}$, which I would denote by $[S^1, \mathbb{RP}^{\infty}]_{\bullet}$. 
In general, $[S^1, X]$ is a quotient of $\pi_1(X) = [S^1, X]_{\bullet}$ by an action of $\pi_1(X)$, namely conjugation, so $[S^1, X] \cong \pi_1(X)$ if and only if $\pi_1(X)$ is abelian. In particular, $[S^1, \mathbb{RP}^{\infty}] \cong \pi_1(\mathbb{RP}^{\infty})$ as $\pi_1(\mathbb{RP}^{\infty}) \cong \mathbb{Z}_2$ is abelian.
Returning to the question at hand, $G_n(\mathbb{R}^{\infty})$ is the classifying space of principal $O(n)$-bundles. So there is a universal $O(n)$-bundle $E_n \to G_n(\mathbb{R}^{\infty})$ with $E_n$ weakly contractible. In fact, $E_n = V_n(\mathbb{R}^{\infty})$ and the associated vector bundle is the tautological bundle $\gamma_n$. The long exact sequence in homotopy applied to the universal $O(n)$-bundle gives
$$\dots \to \pi_1(E_n) \to \pi_1(G_n(\mathbb{R}^{\infty})) \to \pi_0(O(n)) \to \pi_0(E_n) \to \pi_0(\operatorname{Gr}_n(\mathbb{R}^{\infty})).$$
As $E_n$ is weakly contractible, it is connected and simply connected, so 
$$\pi_1(G_n(\mathbb{R}^{\infty})) \cong \pi_0(O(n)) \cong \mathbb{Z}_2.$$
Since $\pi_1(G_n(\mathbb{R}^{\infty})) \cong \mathbb{Z}_2$ is abelian, 
$$\operatorname{Vect}_n^{\mathbb{R}}(S^1) \cong [S^1, G_n(\mathbb{R}^{\infty})] \cong \pi_1(G_n(\mathbb{R}^{\infty})) \cong \mathbb{Z}_2.$$
A different way to compute $\operatorname{Vect}_n(S^1)$ is to use the clutching construction in which case we see that 
$$\operatorname{Vect}^{\mathbb{R}}_n(S^1) \cong [S^0, O(n)] \cong \pi_0(O(n)) \cong \mathbb{Z}_2$$
as before.
