There is really nothing that can be said here…it’s weird that you say it works in 2.1.2 but not 2.5.3 but the only information that is shown in the log is that the other side didn’t respond. Is there any reason you are upgrading to the non-latest version (2.7.1 is the latest at the time of writing)?
the method to call the Gateway have change between the 2 version of CBL ?
I think something (antivirus firewal or other) block the traffic or port in 2.5.3 configuration and not in 2.1.2
Nothing springs to mind as different between those two versions but keep in mind how old they are at this point, so a lot of things have been forgotten. Try disabling the firewall completely to see if that fixes things though. Make as direct of a connection as possible to test things.