The LM317 can operate with up to 43 volts between its input and output pins, so the circuit does not need any changes because you have a 24 V source rather than an 18 V source. To be clear, you would need a heatsink for the 317 even with a 15 - 18 V source, just not as large.
The circuit uses he 317 to create a constant current, not a constant voltage, so the calculation is for the current output, not the voltage. The way a constant current source works is that the output voltage varies automatically to hold the output current constant even if the load resistance or impedance changes. So when the battery is completely discharged, the output voltage might be only 4 V but the current will be 650 mA. When the battery is fully charged the output voltage might be 14 V, but the output current still will be 650 mA. This can create a problem, which I will get to later.
To your next question, the calculation for setting the output current has to do with the BC547 transistor and the 1 ohm resistor. That can be almost any small signal NPN transistor such as 2N2222, 2N3904, 2N4401, etc. While all transistors vary, a good estimation of the base-emitter forward voltage is 0.65 V, or 650 mV. The charging current through the battery returns to the source through the base-emitter resistor, 1 ohm on the schematic. When the current is large enough that the voltage across it is 650 mV, the transistor starts to conduct and turn down the 317 output to maintain that 650 mV across the resistor. So the output current calculation is:
Iout = Vbe / R --> I out = 0.65 / 1 = 0.65 A or 650 mA.
Is this safe? Don't know. While the term "gel cell" tells us many things about your battery, it doesn't tell us everything. So we don't know the best safe maximum charging current for fast charging. But generally speaking, many manufacturers recommend that the max charging current be no more than 1/10 the battery's capacity. For a 7.2 A h battery this would be 0.72 A or 720 mA. This is why I think a 650 mA charging current is safe, but note that this is only a guess.
A problem with this type of charger is that it does not automatically reduce the charging current when the battery is fully charged. Leaving a battery connected to this circuit for a long time probably will shorten the life of the battery. This is why I said this circuit needs an alarm clock. The smart battery charging chips from Maxim and LTC have voltage monitors, current monitors, and power control circuits to prevent overcharging and overheating. So they are absolutely safer IF you know the charge details of your battery. The chips are not magical; they limit the charge current and voltage and time and power levels to the values you set with the external components. Also, the circuits are more complex, the chips are more expensive, and can be difficult to purchase in low quantities like one or two pieces depending on what country you are in. And, going back to post #3, you still will need a heatsink.
One way to stay with your original circuit and reduce the risk of damage to your battery is to add another LM317 as a voltage regulator before the one in the schematic. So two 317's in series: the first one limits its peak output voltage to about 16-17 V, and the second one limits the peak output current to 650 mA. The second on requires 2-3 V across it to function, so if you want a max voltage across a charges up battery to be 14 V, its source has to be 16-17 V, the output of the first one. This is actually a fairly common technique. If you search the web for schematics of power supplies using the 317, you'll see many that have two in series like this to give independent control of the max output voltage and the max output current.
ak