This paper is concerned with the existence of competitive equilibria in electricity markets with nonconvex network constraints and nonlinear cost/utility functions. It is assumed that each self-interested market participant shares limited information with the Independent Service Operator (ISO). A necessary and sufficient condition is obtained to guarantee the existence of a competitive equilibrium in the context of economic dispatch. It is shown that a competitive equilibrium may exist, even when the duality gap is nonzero for the optimal power flow (OPF) problem. However, the Lagrange multipliers for the power balance equations in the OPF problem are indeed a correct set of market-clearing prices in presence of no duality gap, which is the case for IEEE systems with 14, 30, 57, 118 and 300 buses. In the case of zero duality gap for the OPF problem, a dynamic pricing scheme is proposed to enable the ISO to find the correct locational marginal prices in polynomial time. Finally, under the assumption that there are a sufficient number of phase shifters in the power system, it is proved that a competitive equilibrium always exists if the Lagrange multipliers associated with the power balance equations are all positive.