A massive gas giant caught in formation