We present a theory describing the superconducting (SC) interaction of Dirac electrons in a quasi-two-dimensional system consisting of a stack of N planes. The occurrence of a SC phase is investigated both at T = 0 and T ≠ 0 , in the case of a local interaction, when the theory must be renormalized and also in the situation where a natural physical cutoff is present in the system. In both cases, at T = 0 , we find a quantum phase transition connecting the normal and SC phases at a certain critical coupling. The phase structure is shown to be robust against quantum fluctuations. The SC gap is determined for T = 0 and T ≠ 0 , both with and without a physical cutoff and the interplay between the gap and the SC order parameter is discussed. Our theory qualitatively reproduces the SC phase transition occurring in the underdoped regime of the high- T c cuprates. This fact points to the possible relevance of Dirac electrons in the mechanism of high- T c superconductivity.