Arduino. How do I limit the output value of a PID controller?
You could clip the output, as suggested by @jippie and @jrtrzeciak or, implement a more advanced approach as discussed below.

When simply limiting the output, an issue is coming from the integral part. When you reach one of your boundaries, the integrator continues to sum up things. And when the output should come back within the allowed range, it takes ages to recover because the I accumulator value became HUGE. This is called an integral windup or a reset windup.

A clever way of dealing with this is to recompute what would have been the I accumulator if the output was at the clipping value. And you replace you I accumulator value with this new value. This approach is a kind of anti-reset windup technique.

The most important here is the wordings. Now you know how to name your issue (integral windup) and you can spend time to find on the web the right mitigation system that is best suited to your application. 

There a plenty of example. But you need to know how to look for them...

As an external ressource, a nice example (with code) is given here : http://brettbeauregard.com/blog/2011/04/improving-the-beginner%E2%80%99s-pid-reset-windup/