We consider a quantum-critical metal with interaction mediated by fluctuations of a critical order parameter. This interaction gives rise to two competing tendencies -- pairing and non-Fermi liquid behavior. Due to competition, the pairing develops below a finite $T_p $, however its prominent feedback on the fermionic self-energy develops only at a lower $ T_{cross}$. At $T<T_{cross}$ the system behavior is similar to that of a BCS supercoductor -- the density of states (DOS) and the spectral function (SF) have sharp gaps which close as $T$ increases. At higher $T_{cross}<T<T_{p}$ the DOS has a dip, which {it fills in} with increasing $T$. The SF in this region shows either the same behavior as the DOS, or has a peak at $omega =0$ (the Fermi arc), depending on the position on the Fermi surface. We argue that phase fluctuations are strong in this $T$ range, and the actual $T_c sim T_{cross}$, while $T_p$ marks the onset of pseugogap behavior. We compare our theory with the behavior of optimally doped cuprates.