Common on the X5 when the battery is disconnected and the alarm siren battery runs low on charge.
After reconnecting the battery and disarming the alarm (usually goes off when reconnecting), turn the key to position 1.
On the cluster 4.4 or MID 3.0 you will see the display counting down about 10 mins.
Sit inside until the countdown ends. Once the count down ends start the engine, it will be fine after this.
If unsuccessful the first time then try again, but unhook the battery first and wait exactly 2 minutes. Reconnect and go through the procedure again.