How did the current government gain power in the state of Israel?

If by "current government", the question refers to Prime Minister Netanyahu's administration, he came to power in free and fair elections from among the Israeli citizenry.

If by "current government", the question refers to the Israeli polity itself, the Jews in Mandatory Palestine acted on the permission granted to them by UN Resolution 181 by declaring independence on May 14, 1948 (nearly six months after the Resolution was passed) and therefore creating the State of Israel. They managed to remain in power by successfully repelling all military threats to their authority.