Perspective Warp
With Perspective Warp you adjust the perspective of an element in your photo separately, as if you were shifting the viewpoint. You draw planes over the image and bend them to straighten lines or tilt an object. Handy for architecture or to match two images in perspective.
Choose Edit, Perspective Warp and, in Layout mode, draw a grid over the planes of your subject, like the two visible facades of a building. Switch to Warp and drag the corner points to straighten the lines or change the perspective. It works most cleanly on a smart object, so it stays editable. Tip: for simple straightening of a facade, Transform or lens correction is often faster, use Perspective Warp for more complex corrections.
Prefer a look in one click?
The presets on this site set these adjustments up for you as a starting point, which you then fine-tune to taste.