If we are calculating local volatilities, it is usually because we want to calculate prices either by numerically solving a PDE, or by simulating in Monte Carlo. Depending which of these two approaches we are using, the practical approach differs slightly.
To begin with, we assume we are given a nice smooth volatility surface $\sigma_\text{imp}(K, T)$ where $T$ is time to expiry and $K$ is strike, interpolated from some source of volatilities (or backed out from prices).
The standard approach is to use your first formula (Gatheral eq 1.10). Irrespective of whether we are using PDE or Monte Carlo, we always have a time grid. It might, say, be 100 grid points between valuation time and option expiry. Or it might be a daily or weekly time schedule. The expiry derivative (the numerator in the local volatility formula) should always be calculated by finite difference on this time grid (with strike at fixed moneyness).
Traditionally, the strike (actually moneyness) derivatives are calculated analytically from the smooth implied volatility surface. In the PDE approach, we do this at each PDE spot grid point (and each time grid point). In the Monte Carlo approach, there is no spot grid, but we introduce one purely for the local volatilities. Then we create an interpolator, one for each time grid point, that interpolates the local volatilities from the spot grid. When simulating a spot path, we simulate spot rates forwards in time, and use the interpolator at the current time step to get the local volatility.
To understand why we use finite difference for the numerator, we note that in the case that there is no smile/skew it gives the exact Black-Scholes forward-forward volatilities (so a Monte Carlo would have no discretization error, only simulation error).
There is nothing to stop us using your second formula, directly differentiating call/put prices. However the Gatheral formula is much more direct and elegant and has no concern about numerical issues from far in- or out-of-the-money call prices.
Having said this, it has recently become possible to use a variant of your second formula in such a way that when you solve a PDE numerically, you exactly recover call and put prices when they have strike and expiry on the grid. In this case, the derivatives in the denominator are calculated using finite difference on the strike grid, and a slightly more complex formula is used for the finite difference to calculate the numerator. Details are here: https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3530561