After some research on the interwebs, I've found some helpful hints for you and your Snorlax predicament.
From a rant on a post from the GameFAQs Forum:
Just dodging isn't enough, and the positioning isn't relevant. You can be standing behind your opponent and he can still hit you. The mechanic is based off timing. What matters is when you dodge. The timings are different for each attack. The important ones to learn are the charge moves, and even then you only really need to master the popular ones: hyper beam, solar beam, hydro pump, heat blast, blizzard, stone edge, etc. The ones that will 1HKO you.
Machamp or other fighting types at high CP make short work of him.
I've read in quite a few forums that dodging Hyper Beam is all in the timing. As soon as you see the screen flash yellow, you want to swipe to the side to dodge. To get the hang of it, I sometimes will go to gyms I know I can't beat and use my low-level Pidgeys and other Pokemon that I don't really care about (that I will likely transfer or evolve just for XP afterwards), just to practice and get better at it. Here's a quick video that shows perfect dodging (no HP lost whatsoever).
The key is practice. I know you probably didn't want to hear this, but the key really just is practice. Don't sweat too much, Snorlax's Hyper Beam can be dodged when timed correctly. Here is an unofficial guide to Pokemon Go; I found the 'Dodging' subsection under the 'Gyms' section particularly helpful and interesting when I was learning and mastering dodging. Stick with it, and you'll be avoiding all those Hyper Beams in no time.
EDIT: Also, if you find that you are swiping at the same exact time for every Hyper Beam, and some you dodge perfectly and some you get hit, it may also be a server issue. There is always the probability that you didn't time the dodge correctly, but often these high fidelity-requiring moves malfunction when you have a bad internet connection.