Where does this expression of Gaussian curvature come from? In my Differential Geometry course, we have seen a way to calculate the Gaussian curvature $K$ given a metric expressed as the sum of two Pfaff forms $Q = ω_1^2 + ω_2^2$: we find another Pfaff form $ω_3$ (which they said is unique) that meets these equations
$$
\mathrm{d} ω_1 = ω_2 \wedge ω_3 \\
\mathrm{d} ω_2 = ω_3 \wedge ω_1
$$
Then, the Gaussian curvature $K$ is the only function such that $$ \mathrm{d} ω_3 = K ω_1 \wedge ω_2$$ or alternatively $$ K = \frac{\mathrm{d}ω_3}{ω_1\wedge ω_2} $$
My question is, where does this expression come from? I understand what is Gaussian curvature and its relationship to the geometry of a surface and first and second fundamental forms (or at least I think I understand it), but this expression is absolutely misterious to me. I've googled a lot and only found that it may be related to connections but we haven't studied topology yet.
 A: This is (arguably)  the most important question to ask in differential geometry. 
There are several definitions of the Gaussian curvature, including Gauss' original one (very different from yours, he defined it via de 2nd fundamental form, which is not intrinsic, making it seem quite surprising  that $K$ is an intrinsic quantity). 
Some definitions of $K$ are more geometrically satisfying and intuitive, but hard to work with (calculate in examples), others are more abstract and mysterious, but easier to work with, like the one you gave (probably the easiest to work with, using the formalism of moving frames, as developed by  Cartan and Chern). The coordinate formulas you will find in any modern standard textbook, like Kobayashi-Nomizu, are also useful, but equally mysterious.  
One way  to diffuse some of the mystery is to see several  alternative more conceptual definitions. As a rule, the more conceptual definitions say that the value of the curvature function $K$ at a point $p$ on a surface can be expressed as a limit of some combination of easy to grasp geometric quantities (area, length, angles). Conversely, the curvature function $K$ enables one, via integration, to recover the geometric property  that gave rise to $K$. 
The process of digesting the subject consists of following all these back-and-forth moves between the abstract and the concrete, the formal and intuitive, proving the equivalence of the various definitions and checking them  on some key examples (which your teachers and good textbooks should supply). 
So other then these general remarks, what I can offer in this forum is a list of some of the more intuitive alternative definitions of curvature. You can try to prove their equivalence with your definition (it will not be easy, you should get help from books and teachers). 
(1) Area and circumference of geodesic discs. For a disk  of radius $r$ in the euclidean plane its circumference and area are given by  $C_0(r)=2\pi r$, $A_0(r)=\pi r^2.$ Now take a geodesic  disk of radius $r$ centered at some point $p$ of a riemannian surface (ie the set of points on the surface whose distance form $p$ is at most $r$), denote its circumference by $C(r)$ and its area by $A(r)$ and write $\Delta A=A(r)-A_0(r)$ and $\Delta C=C(r)-C_0(r)$ as a power series in $r$. Then the 1st non vanishing terms in any of these two series gives $K(p)$. 
(2) Gauss-Bonnet. The sum of the (interior) angles of a triangle in euclidean plane is $\pi$.  On a general surface the sum of the angles is $\pi+\delta,$ where $\delta$ is the integral of $K$ over the triangle. 
(3) Parallel transport. Start at $p$ and walk  a distance $\epsilon$ along a geodesic in some direction. Call the point you arrive at $p_1$. Turn left $90^0$ at $p_1$ and move again a distance $\epsilon$. Call the new point $p_2$. Repeat and get $p_3$, then $p_4$. If you were at the euclidean plane then $p_4=p$, but in  general you are some distance $d(\epsilon)$ from your starting point ($d$ might depend also on the initial direction). Again, if you write $d^2$ as a power series in $\epsilon$, then the 1st non-vanishing term gives $K(p)$. 
(4) Rolling. Draw a little simple closed loop of area $A$ starting and terminating at $p$. Take a piece of (flat) cardboard and draw an arrow on it. Now align the cardboard with the tangent plane at $p$, so the arrow is pointing in a direction parallel to the  initial direction of the loop on the surface. Now roll the cardboard along the loop, without slipping or twisting. When the cardboard is back to the tangent plane at $p$,  the direction of the arrow on the cardboard will form some angle wrt its initial direction. 
If you write this angle as a function of $A$, the 1st significant term gives $K(p).$ 
(5) Divergent geodesics. If we shoot two particles  off  $p$ along two different geodesics, at the same  speed, then the distance between them, if we were at the plane, grows linearly with time. On a general surface the distance will grow slower or faster then linear, and the 1st significant term in the expression describing this divergence gives $K(p).$

Perhaps some other participants of this forum could  contribute more items to this list. 
A: This is a really good question.
Acknowledgement: Pretty much everything I'm about to say is lifted directly from Barrett O'Neill's "Elementary Differential Geometry."
Recall: Given an orthonormal frame field $\{E_1, E_2\}$ on a surface $M$, we define $\omega_1, \omega_2$ as their dual $1$-forms.  That is,
$$\begin{align*}
\omega_1(E_1) & = 1, & \omega_1(E_2) & = 0 \\
\omega_2(E_1) & = 0, & \omega_2(E_2) & = 1. \\
\end{align*}$$ 
We can interpret $\omega_3$ (usually denoted $\omega_{12}$ or $\omega_{21}$ in the literature) as describing the rate of rotation of the frame $\{E_1, E_2\}$.
(This is somewhat analogous to how the curvature $\kappa$ of a curve in $\mathbb{R}^3$ describes how much the tangent vector $t$ is rotating towards the normal vector $n$, or how the torsion $\tau$ describes how much the normal vector $n$ is rotating towards the binormal vector $b$.)
The nice thing here is that the forms $\omega_1, \omega_2$, and $\omega_{12}$ are intrinsic to the surface: we can make sense of them completely without reference to the ambient space $\mathbb{R}^3$.  Said another way, they can be defined without reference to a surface normal vector field (unlike, say, the second fundamental form or shape operator or mean curvature).

But let's take an extrinsic point of view for a moment.  Suppose that $M$ lies in $\mathbb{R}^3$, so that we can talk about its shape operator $S$.  Let's express the shape operator in terms of our frame field $\{E_1, E_2\}$.  Doing so, we write
$$S(v) = \omega_{13}(v)E_1 + \omega_{23}(v)E_2,$$
where $\omega_{13}$ and $\omega_{23}$ are two new $1$-forms, which function as the components of $S$ with respect to our frame field.  Said another way, we can write the shape operator as a matrix
$$S = \begin{pmatrix}
\omega_{13}(E_1) & \omega_{13}(E_2) \\
\omega_{23}(E_1) & \omega_{23}(E_2) \\
\end{pmatrix}.$$
So what?  Well, if we recall that the Gaussian curvature $K$ is the determinant of the shape operator, we see that
$$K = \det(S) = \omega_{13}(E_1)\omega_{23}(E_2) - \omega_{13}(E_2)\omega_{23}(E_1) = (\omega_{13} \wedge \omega_{23})(E_1, E_2),$$
and so
\begin{equation}
\omega_{13} \wedge \omega_{23} = K \,\omega_1 \wedge \omega_2. \tag{1}
\end{equation}
Finally we get to the point: there is a very important equation, called Cartan's Second Structure Equation, which says that
\begin{equation}
d\omega_{12} = \omega_{13} \wedge \omega_{23}. \tag{2}
\end{equation}
This is essentially saying that the ambient space, $\mathbb{R}^3$, is flat (though I won't go into why you should believe me on that).  At any rate, putting (1) and (2) together gives the Gauss Equation
$$d\omega_{12} = K\,\omega_1 \wedge \omega_2.$$
