In the departure area in the airport, just opposite to QNB office, there is an immigration office. Just enter there, ask for the form to apply, you will be asked for ID and maybe Company ID. You pay the fee depending on what do you want (1, 2 or 3 yrs). Then they will get your biometric data. And after all that (which could be up to 10 mins) you are done. You have your e-gate card.

Also as a reminder be aware that you will need to have an "exit permit" in order to be able to use it either when leaving the country or when returning.

Best of luck....have a great day.