In a nutshell: under the eyedropper tool is the measure tool.
Click and drag a line along a line that should be vertical or horizontal.
Then click Image/Rotate Canvas/Arbitrary...
It will usually have an angle suggestion that will bring that line to perfect verticality or horizontality...






