Hi. Thanks for your question. I am a board certified neurologist.
There are a couple conditions that could produce this combination of symptoms. One would be a condition that some experts consider to be a questionable condition as to whether it truly exists, but it is called cervical vertigo. This is a condition where degenerative changes of the spine may press on vascular structures in some cases and disrupt blood flow to the brain. Another cause of cervical vertigo might be changes in some of the nerve fibers in the neck occurring related to structural spine problems or muscle spasm, which can then cause dizziness. Treating cervical vertigo can be a challenge, but imaging of the neck portion of the spine might in some cases result in options for treatment.
Another condition that can produced pain in the back of the neck and dizziness would be a stroke caused by a tear in the lining of the artery in the back of the neck called the vertebral artery. This is uncommon and usually caused by trauma to the neck, and would typically result in a sudden onset of vertigo and dizziness. The dizziness typically would be constant and often accompanied by nausea, walking imbalance, or slurred speech.
Otherwise, it is possible the 2 are unrelated, in which case one could have a variety of spine issues causing neck pain, and the dizziness could be related to multiple factors such as poor perfusion of blood to the brain, or an inner ear problem causing vertigo, for example.
I would strongly recommend seeking medical evaluation to get a good history and exam, and help find a cause and solution to your symptoms.
Best wishes. Please let me know if there are more questions. If this has been helpful, please rate me highly, and bonus always appreciated!