*Turning off your firewall doesn't help; If the problem was your FW, you would be getting bad gateway on every website pretty much.
1) Clear cache & cookies
2) Restart browser in safe mode
3) Try another browser
4) Reset your internet connection
5) If problem persists for a longer time, try contacting your ISP explaining the situation
Otherwise the problem behind 502 Gateway normally means that when you were contacting the website, two or more servers that were supposed to 'communicate', have failed to do so.
Are you 100% sure this 502 comes up for so many wesbites? Because normally 502's are the websites / server's fault, not the computer's or the internet's <--> If it's consistant however, it probably has something to do with your service provider, who you may want to try contacting. However if it were your ISP's fault, you should be getting a Bad Gateway failure on every website, not only on a few of them.