The error means a web server you are trying to communicate with takes too long to respond, and is considered "timed-out". You can't do anything about it, it's their problem.
The 504 Gateway Timeout error is an HTTP status code which means one server did not receive a timely response from another server that it was accessing while attempting to load the web page or fill another request by the browser.