A duality theorem for the singularity category of a finite dimensional Gorenstein algebra is proved. It complements a duality on the category of perfect complexes, discovered by Happel. One of its consequences is an analogue of Serre duality, and the existence of Auslander-Reiten triangles for the p-local and p-torsion subcategories of the derived category, for each homogeneous prime ideal p arising from the action of a commutative ring via Hochschild cohomology.