  We consider a general optimal control problem in the setting of gradient
flows. Two approximations of the problem are presented, both relying on the
variational reformulation of gradient-flow dynamics via the
Weighted-Energy-Dissipation variational approach. This consists in the
minimization of global-in-time functionals over trajectories, combined with a
limit passage. We show that the original nonpenalized problem and the two
successive approximations admits solutions. Moreover, resorting to a
$\Gamma$-convergence analysis we show that penalised optimal controls converge
to nonpenalized one as the approximation is removed.
