The calculation method is close enough to OK to be OK.
But you may have made a very bad assumption re required switching speed.
Examination of your formula and situation will make it clear that the current is the average gate current while the gate capacitor is charging (OR discharging).
The average current = Q.f = Ig.t.f
where t is charge time and f is number of gate turn-ons/second.
The LMx17xx family are not LDOs by any normal meaning of the term. It's probably not too important here.
As above, the figures for current is mean current during turn on.
IF you turned the MOSFET on at 50 kHz and
turn on time = 200 nS
and I_gate_average = 1A
Then
Imean = Ig.t.f = 1 x 2E-7 s x 50000 = 10 mA average.
A suitably sized capacitor at the regulator output would probably suffice and allow the regulator to be very understressed.
Be sure that when you say 50 kHz you mean that that is the number of times per second that the FET is turned on.
Also note that at 50 kHz your PWM "frame period" = 1/50 kHz = 20 uS BUT if your PWM can run down to 1% duty cycle then an on time for the shortest bit is 20 uS/100 = 0.2 uS = your design charge time.
Tmin_on = 1/frame_frequency x minimum_duty_cycle.
Why are you using the HV part?
usually the regulator is fed from a supply slightly above Vout.
In most cases the HV part would be over over kill.
If it is needed it suggests that you are trying to do something "tricky".
Be sure your MOSFET gate can tolerate 15V.
Put a reverse biased zener gate to source close to MOSFET with minimum lead and track lengths. Vzener > Vgate_drive_max and < to << Vgate_abs_max. This clamps the gate safely against eg Millar capacitance drain transients. Theoretically not needed with pure resistive load. I ALWAYS fit one. Certainly a good idea with an inverter.
Overkill - reverse biased small Schottky gate to source same as zener. If gate rings the SChottky clamps negative half ringing cycle and eats ringing energy.
Be sure to have turn off gate drive that is about as aggressive as turn on drive.
The IRF540's maximum specified Gate leakage is 100nA at 25°c, so theoretically you could use up to 1 Meg (for voltage drop of 0.1V or less). However leakage current increases with temperature, and such a high resistance could make the Gate quite sensitive to noise.
Use the lowest value that meets your safety requirements. Anything up to 10k should be fine.
Best Answer
Since you're just switching a magnet, you don't need high speed, or high gate current. However, since your MCU operates on 3.3 volts, you do need some sort of driver to guarantee that your MOSFET gets turned on strongly, and 3.3 volts on an output just won't do that.
For a simple case like this, all you need is a transistor and a few resistors, and
simulate this circuit – Schematic created using CircuitLab
this will do, as long as you don't mind the fact that the signal is inverted. That is, a high output at the MCU will turn the relay off, not on. Note a few things. R2 and R3, when the transistor is off, set the gate drive at 12 volts. Without the combination, using only R2 would apply a maximum of 24 volts to the gate, and this exceeds the maximum specification. Also, D1 is called a flyback diode, and you should always use one when switching anything with a coil. If you don't, when you turn off the relay you'll get a big voltage spike across it, and you may well kill your transistor. Worse, sometimes it will take multiple operations to kill the transistor, so you think you've got a working circuit, but you can't understand why it's unreliable. The diode should be rated for whatever current the relay coil draws, and have a higher voltage rating than the power supply.