Any $\sigma$-algebra of subsets of $\mathbb{R}$ which contains all open intervals also contains all closed intervals
Remember that if we have a $\sigma$-algebra, then any countable intersection of sets in the $\sigma$-algebra must also be in the $\sigma$-algebra.
Also, note that any closed interval on $\mathbb{R}$ is of the form $(-\infty,a]$ or $[a,b]$ or $[b,\infty)$ or $(-\infty,\infty)$, where $a,b \in \mathbb{R}$.
$(-\infty,\infty)$ is also open and hence is in the $\sigma$-algebra.
Now lets consider $[a,b]$. The important thing to recognize is that $[a,b]$, where $a,b \in \mathbb{R}$, can be written as a countable intersection of open intervals, for instance $$[a,b] = \bigcap_{n=1}^{\infty} \left(a - \frac1n, b+ \frac1n \right)$$
Since each of $\displaystyle \left(a - \frac1n, b+ \frac1n \right) \in \sigma$-algebra, so does the countable intersection which is nothing but $[a,b]$.
Closed intervals of the form $(-\infty,a]$ can be written as $\displaystyle \bigcap_{n=1}^{\infty} \left(-\infty, a + \frac1n \right)$ and similarly, closed intervals of the form $[b, \infty)$ can be written as $\displaystyle \bigcap_{n=1}^{\infty} \left(b - \frac1n , \infty \right)$.
EDIT:
To prove, $\displaystyle [a,b] = \bigcap_{n=1}^{\infty} \left(a - \frac1n, b+ \frac1n \right)$, we will prove that $$[a,b] \subseteq \bigcap_{n=1}^{\infty} \left(a - \frac1n, b+ \frac1n \right)$$ and $$[a,b] \supseteq \bigcap_{n=1}^{\infty} \left(a - \frac1n, b+ \frac1n \right).$$
Consider $x \in [a,b]$. This means that $a \leq x \leq b$. However, $a - \frac1n < a$ and $b < b + \frac1n$, for all $n \in \mathbb{Z}^+$. Hence, we have that $$a - \frac1n < a \leq x \leq b < b + \frac1n,$$ for all $n \in \mathbb{Z}^+$. Hence, $\displaystyle x \in \left(a - \frac1n, b+ \frac1n \right)$, forall $n \in \mathbb{Z}^+$. Hence, $$x \in \bigcap_{n=1}^{\infty} \left(a - \frac1n, b+ \frac1n \right).$$
Hence, $$[a,b] \subseteq \bigcap_{n=1}^{\infty} \left(a - \frac1n, b+ \frac1n \right).$$
Now consider $\displaystyle x \in \bigcap_{n=1}^{\infty} \left(a - \frac1n, b+ \frac1n \right)$. This means that $$a - \frac1n < x < b + \frac1n,$$ forall $n \in \mathbb{Z}^+$. If $x \notin [a,b]$, say $x < a$, by Archimedean property, we can find a $m \in \mathbb{Z}^+$ such that $x < a-\frac1m < a$. But this means that $\displaystyle x \notin \bigcap_{n=1}^{\infty} \left(a - \frac1n, b+ \frac1n \right)$. Similarly, if $x > b$, then by Archimedean property, we can find a $m \in \mathbb{Z}^+$ such that $ x > b + \frac1m $. But this means that $\displaystyle x \notin \bigcap_{n=1}^{\infty} \left(a - \frac1n, b+ \frac1n \right)$. Hence, $x \in [a,b]$. Hence, $$[a,b] \supseteq \bigcap_{n=1}^{\infty} \left(a - \frac1n, b+ \frac1n \right).$$
From the above, we can hence conclude that $$[a,b] = \bigcap_{n=1}^{\infty} \left(a - \frac1n, b+ \frac1n \right).$$
One slightly easier argument than the one presented in the two answers before me:
Suppose $[a,b]$ is a closed interval, and you want to show that it is in the $\sigma$-algebra. You know that $(b,\infty)$ is an open interval and you know that $(-\infty,a)$ is an open interval.
Therefore both of them are in the $\sigma$-algebra, and so is their union: $(-\infty,a)\cup(b,\infty)$. But now we also know that $\sigma$-algebras are closed under complements so $\mathbb R\setminus\Big((-\infty,a)\cup(b,\infty)\Big)=[a,b]$ is in the $\sigma$-algebra, as wanted.
This proof, I think is better, because it does not require the fact that we have countable intersections. We only used a union of two sets and a complement. So in fact we proved more:
If $\Sigma\subseteq\mathcal P(\mathbb R)$ is a field of sets (i.e. an algebra) and it contains all the open intervals then it contains all the closed intervals too.
In order to show $[a,b]=\cap_{n=1}^\infty (a-1/n,b+1/n)$ we need to show that $[a,b]\subseteq\cap_{n=1}^\infty (a-1/n,b+1/n)$ and $[a,b]\supseteq\cap_{n=1}^\infty (a-1/n,b+1/n)$. For $[a,b]\subseteq\cap_{n=1}^\infty (a-1/n,b+1/n)$, we need only observe that $[a,b]\subseteq (a-1/n,b+1/n)$ for all $n$, since $$x\in [a,b]\implies a\leq x\leq b\implies a-1/n<x<b+1/n\implies a\in (a-1/n,b+1/n).$$ For $[a,b]\supseteq\cap_{n=1}^\infty (a-1/n,b+1/n)$ we observe that if $x\notin [a,b]$ then either $x<a$ or $x>b$, and if $x<a$ then there is some $n$ such that $x<a-1/n$ thus $x\notin (a-1/n,b+1/n)$ so $x\notin \cap_{n=1}^\infty (a-1/n,b+1/n)$ while if $x>b$ there is some $n$ such that $x>b+1/n$ thus $x\notin (a-1/n,b+1/n)$ so $x\notin \cap_{n=1}^\infty (a-1/n,b+1/n)$.