I am not sure how I got that tilt. How can I get the viewport to be correctly aligned again?
If it's the viewport camera, simply hit NUMPAD1, NUMPAD3 or NUMPAD7 to get into an aligend view. Alternatively use the View menu (Right, Front or Top).
If your camera object got tilted, open the properties with N, find the rotation values in the Transform panel and find the value that isn't quite 90 or 0 degrees and enter a clean value.
Shift+C will re-center the camera on the origin. It is possible this tilt is acquired from Shift+Num4 or Shift+Num6 which control the roll of the camera. As @Haunt_House mentioned, the N panel has all camera translation information, which you can change manually if desired.