So, to add a bit of clarification to all the answers.
The Tri-current (Tarai Current) are a natural whirlpool at the intersection of the Calm Belt and Red Line. The WG build three facilities around the current (Impel Down - MarineFord - Enies Lobby), making use of the current power to fast travel between the three. The currents work also underwater as per natural ocean currents, but probably have different speeds and power at different underwater levels.
Here's a pictures depicting the wihrlpool:
The Gates of Justice are 3 such gates placed at the "corners" of the current from where you can enter or access it. This is the only way for normal ships (floating ships) to get inside the current. The whole phenomenon doesn't quite follow natural physics so one shouldn't try to find natural ways of how to enter/exit it.
Also, you can't get in from the outside without using the gates as the outside currents will push you away from the whirlpool and vice-versa from the inside where the whirlpool will keep pushing you into a circle.
Now on how Law & others managed to get there.
One possibility is that they entered the current by going underwater through the Gates of Justice while they were openend. After the gates close, the outside currents will keep you from entering, even underwater. That is why Bepo said to hurry as the gates are closing, so they could catch the overflowing current to the outside, while submerged. The same applies to WB's ship who was also underwater.
Another possibility for WB's ship to enter is if he used the Gura Gura no Mi's powers to temporarily divert the currents and enter from any side of the whirlpool. Law still had to enter from the gates nontheless.
And even another posibility could be that they entered MarineFord by bypassing the big current, from Sabaody Arch. for exemple, and managed to get around the marines defence of those waters. They probably left through the Gate of Justice to make for a quick escape rather then going back and risking to get captured.
More on One Piece fandom about the Tarai Current.