I've contacted engineers, code writers and other computer super-literates and each tell me the same thing:
It's a problem with wordpress, not you.
I would have thought that individuals with those qualifications would have been slightly more inquisitive than that if they were familiar with WordPress.
If you Google your error message, the evidence seems unlikely that this is strictly a WordPress application issue.
http://www.google.com/#hl=en&q=504+Gateway+Time-Out+nginx&btnG=Google+Search&aq=f&oq=undefined&fp=_rpp-4zAm3I
That's not to say that something you have added to the application, or http server timeout settings issues, or proxy configurations, or redirect rules, may not be involved in contributing to an issue, but I was hard pressed to find any reference to this error being caused by the WordPress package.
I don't think it's on campus.
So, again, just to be clear... You do not know who is hosting your site (running the server that your website is actually located on)or how to contact them, so you have not yet consulted with them for information or support on the 504 error. Am I interpreting that correctly?
You could also post a link to the site you are having trouble with. Maybe someone will see something that might help you.
Another Google search using these keywords might also be time well spent for information gathering: 504 Gateway Time-Out Nginx WordPress