How to create real tilt-shift lens blur in Blender?
I want to provide an alternative to cegatons answer. This is an attempt to reproduce the behavior of a real Scheimpflug. The focus plane is supposed to "cut" objects. When you create the focus plane in post however, it doesn't intersect with the objects. To mimic this behavior, follow these steps:


Create a Cube in your scene, name it "gradient Cube" or similar, it will control the falloff of the gradient. In the object tab, disable all cycles visibility options (camera, diffuse, ..., shadow) to make it completly invisible for the renderer. Create a second RenderLayer ("gradient"), add a material to it, with the nodesetup shown in image 1. In the TextureCoordinate node choose your gradient cube as object input.
Position the cube so that the middle grey (~0,5) of the gradient follows the desired Scheimpflug. The farthest visible point from camera should be black (0), the neares white (1).
Render the image. Save each RenderLayer to OpenEXR, 32 Bit float. I added the contrast only for illustrating that the gradient now "cuts" the objects. The actual gradient is very flat.
I would recommend not to use the blender Defocus. It produces horrible artifacts. I used Nuke non-commercial, which is free to download/use with some restrictions in functionality. Read both renderlayers. Shuffle them together, take RGB from the beauty pass and shuffle the R channel of the gradient layer to Z(depth). Insert ZDefocus, choose the focal point. To round it off, introduce some grain. (the out-of-focus areas looked too smooth)




The result with animated gradient-cube: