Final Gambit causes the user to faint, and the target receives damage equal to how much HP the user lost.
If Final Gambit doesn't hit the opponent due to missing, type immunity, or protection move, then Final Gambit will fail and the user will not faint. This differentiates it from Explosion and Self-Destruct.
The move's side effect is not considered as inflicting damage to the user, and so if the user is holding a Focus Band, Focus Sash, or has Sturdy, it will not activate and the user will still faint. However, the move inflicts damage to the target, and so the target's Focus Band, Focus Sash, Sturdy, and/or Endure can still trigger if applicable, so that the target will be left with 1 HP.
The user risks everything to attack its target. The user faints but does damage equal to its HP.