We present methods for the optimal control of systems governed by partial differential equations with infinite-dimensional uncertain parameters. We consider an objective function that involves the mean and variance of the control objective, leading to a risk-averse optimal control formulation. To make the optimal control problem computationally tractable, we employ a local quadratic approximation of the objective with respect to the uncertain parameter. This enables computation of the mean and variance of the control objective analytically. The resulting risk-averse optimization problem is formulated as a PDE-constrained optimization problem with constraints given by the forward and adjoint PDEs for the first and second-order derivatives of the quantity of interest with respect to the uncertain parameter, and with an objective that involves the trace of a covariance-preconditioned Hessian (of the objective with respect to the uncertain parameters) operator. A randomized trace estimator is used to make tractable the trace computation. Adjoint-based techniques are used to derive an expression for the infinite-dimensional gradient of the risk-averse objective function via the Lagrangian, leading to a quasi-Newton method for solution of the optimal control problem. A specific problem of optimal control of a linear elliptic PDE that describes flow of a fluid in a porous medium with uncertain permeability field is considered. We present numerical results to study the consequences of the local quadratic approximation and the efficiency of the method.