Some people call it tacking, cuz it's similar to tacking in a sailboat.
And yeah, it's easier than riding the bike straight up in the same gear. BUT less efficient than getting in a low enough gear to ride straight up the hill.
I usually only do that when it gets REALLY steep. And typically on my fixed gear.