I was not specifically saying something was wrong within your home network. Your network includes your connection to the internet through your ISP; perhaps they are having issues with their gateways/routers.
I also indicated the issue could be with the network's website.
504 Gateway Time-out
seems to indicate it's a "them" problem, not a "you" problem.
Of course, your logs may show something different; but without sharing them all anyone can do is guess as how to help you.