Motivated by the seminal paper due to Brezis-Nirenberg (in: Commun Pure Appl Math 36:437-477, 1983), we will establish the existence of solutions for the following class of degenerate elliptic equations with critical nonlinearity: <disp-formula id="Equ68"><mml:mtable><mml:mtr><mml:mtd columnalign="right"><mml:mfenced open="{"><mml:mtable><mml:mtr><mml:mtd columnalign="left">-Delta gamma v=lambda |v|q-2v+<mml:mfenced close="|" open="|">v</mml:mfenced>2 gamma</mml:msubsup>-2v</mml:mtd><mml:mtd columnalign="left"><mml:mspace width="0.333333em"></mml:mspace>in<mml:mspace width="0.333333em"></mml:mspace>Omega,</mml:mtd></mml:mtr><mml:mtr><mml:mtd columnalign="left">v=0</mml:mtd><mml:mtd columnalign="left"><mml:mspace width="0.333333em"></mml:mspace>on<mml:mspace width="0.333333em"></mml:mspace>partial derivative Omega,</mml:mtd></mml:mtr></mml:mtable></mml:mfenced></mml:mtd></mml:mtr></mml:mtable><graphic position="anchor" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="12220_2023_1507_Article_Equ68.gif"></graphic></disp-formula>where Delta gamma:=Delta x+(1+gamma )2<mml:mfenced close="|" open="|">x</mml:mfenced>2 gamma Delta y is the Grushin operator, z:=(x,y)is an element of RN, N=m+n,m,n >= 1,Omega subset of RN is a smooth bounded domain, lambda >0, q is an element of [2,2 gamma</mml:msubsup>) and 2 gamma</mml:msubsup>=<mml:mfrac>2N gamma N gamma -2</mml:mfrac> is the critical Sobolev exponent in this context, where N gamma =m+(1+gamma )n is the so-called homogeneous dimension attached to the Grushin operator<mml:msub>Delta gamma. In order to prove our main results it was necessary to do a careful study involving the best constant <mml:msub>S gamma (m,n) of the Sobolev embedding for the spaces associated with <mml:msub>Delta gamma. In order to do that, we prove a version of the Lions' Concentration-Compactness Principle for the Grushin operator. We also provide existence results for a critical problem involving the Grushin operator on the whole space RN.