That's a misquote.
https://www.israelnationalnews.com/News/News.aspx/284788
He didn't say the blast was a gift from god.
He said:
"If it was us, and I hope it was us, then we should be proud of it, and with that we will create a balance of terror. By avoiding saying it's us - we are putting ourselves on the dark side of morality"
"We are all allowed to rejoice that it exploded in the port of Beirut and not in Tel Aviv".
"You don't really believe that this was some messy fuel warehouse, yeah? Do you understand that this hell was supposed to fall on us as a rain of missiles?!"
"I have some experience with explosives. The largest explosion I took part in was 2.5 tons of TNT."
"What we saw yesterday at the Port of Beirut was much bigger. The destructive effect (without the radiation) was like a nuclear bomb."
"I have been warning for years that the withdrawal from Lebanon and the new strategic balance against Hezbollah inserted Israel into a balance of terror that is equivalent to a nuclear bomb by the terrorist organization on our northern border".
"Today is Tu B'Av, a day of joy, and a true and huge thank you to God and all the geniuses and heroes really (!) who organized for us this wonderful celebration in honor of the day of love."
Some of these statements are insulting for sure, and advocating of evil, a misguided "We need to join dark to level playing field with the dark", but he didn't say the explosion was a gift from God.