A wanted man in a stolen car allegedly twice confronted police and threatened officers with a firearm before being fatally shot on the Gold Coast.