It could be a gybe but I don’t think it is. The reason is a true gybe involves the boom whipping very quickly to the other side of the boat. The boom does not move at all until the sail catches the wind on its other side and then the boom whips across very quickly. It is a dangerous maneuver.
I just watched the clip on YouTube and the boom moves more gradually. Also Jack is able to control the boom’s position relative to the boat using the wheel. To me this is a 50% realistic exaggeration of real sailboat mechanics.
When Jack turns the ship hard to the right, (starboard) the whole ship leans (lists) to the left (port). This is because it’s the rudder and keel that turn right first, everything above that wants to keep going straight because of inertia. This includes the boom. So if there’s not a lot of wind in the sail, when you turn hard right everything not battened down moves to the left side of the boat, including the boom(s).
You can control and arrest this movement at any point using the tiller or wheel. If you build up some speed and then the wind dies, you can play all kinds of games with the boom by turning the tiller.
What I think is exaggerated is the responsiveness of the whole ship and the boom, along with the fact that everyone and everything else on the ship (including Will) would be thrown to the left about as fast as the boom was. It almost seems more likely that Will would have gone overboard prior to the boom passing over his position.
The scene to me plays as if it was based on the mechanics of a small single-hand craft and how you can move the boom around very nimbly if you have some momentum, and when they scaled it up they fudged the realism a bit.
Source: I’ve sailed single hand (12’) craft extensively. Only a couple times have I sailed larger craft and never a ship like the ones in the movie. The differences between my single hand experience and what would happen on a much larger ship are speculation based on extrapolation and my knowledge of physics.