Fit then lessons or lessons then fit? That depends on multiple variables:
First thing you should always look at before getting fit: Does the fitter you are looking at going to understand the golf swing? The swing itself is going to dictate the different variables of your golf equipment. Examples: lie angle is dictated by where your hands are at during impact, not where they start (static measurement). Flex of a shaft and material of a shaft is dictated by more then just swing speed but also by your tempo and angle of attack.
I suggest that beginners get fit before lessons for one simple reason, practice makes permanent. Your subconscious is going to help you make contact with the ball and if the equipment is completely out of spec you are going to create some unnecessary bad habits.
A true fitter understands how the club can affect the swing and how the swing affects the club.
Published 7/26/18: Bryan Montgomery