Disclaimer - PPL, fly mostly twins under IFR, in Australia (still ICAO, if anything we're more or less a copy of the FAA).
Most heavy jets are covering between 2-3 miles a minute when coming in to land. Usually a 3 mile call is to affirm to ATC that they are a minute away (or two for GA traffic).
Most heavy jets also need anywhere from half a minute to three get airborne depending on size / weight / weather.
On a clear day - you can see an aircraft lining up to depart so you can slow down a bit to give yourself some space. Usually ATC does that for you - asking one to slow down or the other to hurry up.
Sometimes the sequencing gets a bit tight, it's annoying, you just power up and go around. Depending on visibility - you can circle in the circuit area to come back around, or follow the missed approach and line up to fly the approach (ILS, RNP etc) again.
Now the hard thing here is that it was IFR weather - the incoming aircraft got visible with the runway when it was lower, and it didn't look like the departing aircraft was lifting off so they went around. It also means they have to follow the missed approach.
Everyone was (mostly) aware of where everyone was, there was no real breakdown in communication nor in procedure. Departing aircraft knew there was one incoming and thought they had time, incoming knew there was a plane leaving and knew there might not be enough time. ATC is trying to keep the ball rolling for both. It's happened dozens of times for me.
Final note - a Missed Approach procedure specifically takes you to safe place away from departing aircraft, who follow their own Standard Instrument Departures precisely because of this scenario. It's incredibly rare for these two procedures to converge / overlap.
P.s. I've gone around / gone missed for everything from slow aircraft to gliders to a snake to wind shear to kangaroos. Literally the last few things just before landing you check are that your gear is down, you have clearance to land and the runway is clear.