The symptoms and their sequence you are describing point towards Migraine
. So the symptom which you are describing initially is blurry vision can be a part of so called prodrome of migraine ( Symptoms before onset of headache) which are also called as visual aura.
Second severe pain
precedes this aura.. suggests migraine as a diagnosis.
So I will recommend you to maintain a diary of episodes,duration and any precipitating factors like coffee, tea, watching TV, stress
,etc. This will help to categorize your headache and plan appropriate treatment. Please visit Neurologist
Wish you good health