Bézout's lemma implies that there exist $x,y\in\Bbb Z$ such that
$$
\gcd(b,N) = xb+yN
$$
This implies for $\gcd(b,N)=1$ that $b$ is invertible (with respect to multiplication) $\operatorname{mod} N$ (and $x$ is an inverse).
Edit: On the other hand, if $b$ is invertible there exists an $x\in\Bbb N$ such that $xb \operatorname{mod} N = 1$ so there exists a $k\in\Bbb Z$ such that $xb+kN=1$. If $d\in\Bbb Z$ is a common divisor of $b$ and $N$ we would get $d\mid (xb+kN)$ so $d\mid 1$ which shows $\gcd(b,N)=1$. So actually $\gcd(b,N)=1 \Leftrightarrow b\text{ is invertible}$.
Now the existence of $m\in\Bbb N$ such that $b^m \operatorname{mod} N = 1$ implies that $b$ is invertible. So it only makes sense to talk about $ord(b)$ for invertible $b$, that is the $b$ which satisfy $\gcd(b,N)=1$.
For $\gcd(b,N)=1$ the set $\{m\in\Bbb N : b^m \operatorname{mod} N = 1\}$ is not empty. Its not hard to see that multiplication $\mod N$ with the invertible elements forms a (finite, as there are only finitely many possible values $\mod N$) group (identify $[n]=\{k\in\Bbb Z : k\operatorname{mod} N = n\}$). But in a finite group the values
$$
1 \operatorname{mod} N,\ b\operatorname{mod} N,\ b^2\operatorname{mod} N, \ldots,
$$
can only take finitely many different values, so there exist $i,j\in\Bbb N$ with $j<i$ such that $b^j\operatorname{mod} N=b^i\operatorname{mod} N$ and hence $b^{i-j} \operatorname{mod} N = 1$.
Appendix: $b<N$ is not necessary. If $b>N$ there exists a $k\in\Bbb N$ such that $a=b-kN \in \{0,\ldots, N-1\}$. Now you can expand $b^m = (a+kN)^m$ using the binomial theorem and get
$$
b^m=(a+kN)^m = \sum_{i=0}^m \binom{m}{i} a^{m-i} (kN)^{i} = \binom{m}{0}a^m = a^m \pmod{N}.
$$