In this paper, a locational marginal pricing algorithm is proposed to control the voltage in unbalanced distribution grids. The increasing amount of photovoltaic (PV) generation installed in the grid may cause the voltage to rise to unacceptable levels during periods of low consumption. With locational prices, the distribution system operator can steer the reactive power consumption and active power curtailment of PV panels to guarantee a safe network operation. Flexible loads also respond to these prices. A distributed gradient algorithm automatically defines the locational prices that avoid voltage problems. Using these locational prices results in a minimum cost for the distribution operator to control the voltage. Locational prices can differ between the three phases in unbalanced grids. This is caused by a higher consumption or production in one of the phases compared to the other phases and provides the opportunity for arbitrage, where power is transferred from a phase with a low price to a phase with a high price. The effect of arbitrage is analyzed. The proposed algorithm is applied to an existing three-phase four-wire radial grid. Several simulations with realistic data are performed.