The current practice of discrete-time electricity pricing starts to fall short in providing an accurate economic signal reflecting the continuous-time variations of load and generation schedule in power systems. This paper introduces the fundamental mathematical theory of continuous-time marginal electricity pricing. We first formulate the continuous-time unit commitment problem as a constrained variational problem, and subsequently define the continuous-time economic dispatch (ED) problem where the binary commitment variables are fixed to their optimal values. We then prove that the continuous-time marginal electricity price equals to the Lagrange multiplier of the variational power balance constraint in the continuous-time ED problem. The proposed continuous-time marginal price is not only dependent to the incremental generation cost rate, but also to the incremental ramping cost rate of the units, thus embedding the ramping costs in calculation of the marginal electricity price. The numerical results demonstrate that the continuous-time marginal price manifests the behavior of the constantly varying load and generation schedule in power systems.