Historically, Gauss measured it by an old method called after his name today: The Gauss map.
This maps the normal vector at each point of a surface curve to the unit sphere. Then he measured the angle difference between the starting normal at a point and a normal to the surface as it traced the sides of an infinitesimal triangle on the surface and mapped the corresponding normals on the unit sphere to find another triangle there. Finally, divided the corresponding triangle area on the unit sphere by the triangle area on the surface to find the curvature. This method appeared in his 1827 work "Disquisitiones generales circa superficies curvas" (General Investigations of Curved Surfaces)
Nevertheless, the same map was used by Olinde Rodrigues 12 years earlier than Gauss, anticipating him as early as 1815 by expressing the "Gaussian" curvature as the quotient of the aforementioned surfaces and proving that this curvature is equal to the product of principal curvatures.
It is not known today if Gauss was aware of Rodrigues work or discovered it independently but certainly, Olinde Rodrigues has not received the recognition that he deserves, and his work has not been sufficiently disseminated.