Proof (size of linearly independent set, basis and spanning set)
Let $B$ be a finite basis for $V$.
Inequality
If $T$ is infinite, we are done. Otherwise by the Steinitz exchange lemma, a finite spanning set $T$ is larger than a finite linearly independent set $B$.
If $S$ is finite, by Steinitz, a finite linearly indepenent set $S$ is smaller than a finite spanning set $B$. If $S$ is infinite, pick a subset $S'\subset S$ where $|S'| = |B| + 1$. $S'$ is also linearly independent, which is a contradiction since it cannot be larger than a spanning set $B$.
Equality
If $S$ (or $T$) is a basis, then by definition $\dim(V) = |S|$ (or $|T|$).
If $|S| = \dim(V) = |B|$, then by taking $S$ as a linearly independent set and $B$ as a spanning set in Steinitz, $V$ has a spanning set $S \cup B'$ where $|B'| = |B|-|S| = 0$. Therefore $S = S\cup B'$ spans $V$ and so $S$ is a basis.
Suppose $|T| = \dim(V)$. Since $T$ is a spanning set, there exists a subset $T'\subseteq T$ such that $T'$ is a basis for $V$. But then $|T'| = \dim(V) = |T|$, so $T'=T$ and therefore $T$ is a basis.