You could also make a unit called "HP greater than 5%" or something like that. Remove its model so it's a dummy unit, give it Locust, etc. Now add one to your map. Then in your abilities techtree requirements fields you can add this unit you made. So now create a trigger like they suggested above that checks for health less than 5%. If the health is less than 5% you can remove the dummy unit. Since it is no longer on the map, your ability doesn't meet the requirements and cannot be used. When the unit's health is above 5% again you can create your dummy unit again on the map somewhere so your ability can once again be used.
The best part of this is when you hover over your ability after you drop below 5% it will say "requires - HP greater than 5%"
I used this technique to make an ability called "Last Stand" that can only be used when the HP of the unit is below 25%