As in most such cases, nobody was "first". One can present already the Pythagorean proof of incommensurability of the side and the diagonal of a square as an "impossibility proof". It amounts to saying that it is impossible to split the side into a whole number of equal segments so that the diagonal can be assembled from a whole number of segments of the same length. The proof (in Euclid) is by reductio, as are some other proofs that can be similarly presented. And Gauss did not prove the impossibility part, it was Wantzel in 1837, probably the first geometric impossibility proof recognized as "proper" by modern standards. But by then there were "flawed" 17th century arguments, Euler's proof of irrationality of $e$, Lambert's of $\pi$, and Abel's of insolvability of the quintic in radicals.
But generally this sort of thinking was alien to the constructive "classical conception of proof and knowledge" in mathematics, as Detlefsen called it. For that matter, Greeks lacked "metamathematical" perspective or methods for proving impossibility on a grander scale, like the impossibility of solving "the three construction problems of antiquity" (duplication, trisection and quadrature) with straightedge and compass. Such tools were part of first order discourse about geometric objects, there was no second order discourse about tools.
But there was practical awareness. The three problems have been solved by other tools (quadratrix, intersecting solids, conic sections) since Pythagoreans (Archytas, Hippias), and continued to be so solved even after the straightedge and compass priority was codified by Euclid. Pappus in the Collection even classifies problems according to tools needed and advocates solving them by "appropriate" tools. It is doubtful he'd make the classification if he thought that straightedge and compass constructions were just not yet known (that Euclid, Archimedes and Apollonius did not find them was a strong clue):
"There are, we say, three types of problem in geometry, the so-called 'plane', 'solid', and 'linear' problems. Those that can be solved with straight line and circle are properly called 'plane' problems, for the lines by which such problems are solved have their origin in a plane. Those problems that are solved by the use of one or more sections of the cone are called 'solid' problems. For it is necessary in the construction to use surfaces of solid figures, that is to say, cones. There remain the third type, the so-called 'linear' problem. For the construction in these cases curves other than those already mentioned are required, curves having a more varied and forced origin and arising from more irregular surfaces and from complex motions. Of this character are the curves discovered in the so-called 'surface loci' and numerous others even more involved...".
Second order discourse only emerged in 17th century, Crippa's dissertation Impossibility Results is a comprehensive study. Descartes, Gregory and Leibniz gave some geometric impossibility arguments, but they were flawed from modern perspective:
"The conviction on the impossibility of squaring the circle, duplicating
the cube and trisecting the angle by ruler and compass was in fact grounded on
arguments which, although they appeared either flawed or lacking in rigour if examined
from our viewpoint, enjoyed some circulatation during the second half of XVIIth century,
and were studied and discussed. In particular, my examination will consider some
of the earliest instances of impossibility results and correlated arguments given by René
Descartes (1596-1650) in La Géométrie (1637), then an important impossibility result
about the quadrature of the circle by algebraic or analytical methods, argued by James
Gregory (1638-1675) in his Vera Circuli et Hyperbolae Quadratura (1667), and finally,
the same impossibility result discussed by G.W. Leibniz (1646-1716), in an unpublished
work, which had however a vast resonance among contemporary mathematicians: De
quadratura arithmetica circuli ellipseos et hyperbolae cujus corollarium est trigonometria
sine tabulis (ultimated in 1676)."