Put one of the long planks over one of the levers. If done correctly, when you pull the lever up, the plank will go up, then fall at about the middle of the lever mechanism, under the lever. The plank will then catch the lever as it tries to go down, allowing you to pull the second lever, which opens the portcullis. It may take a few tries however, as you need to balance the plank just right so it doesn't fall to one side.
You're not supposed to get them stuck. You're supposed to run from lever to lever pulling them down as fast as possible. When all the levers are down (except that last one in the picture), the portcullis will open. However, as soon as one lever reverts position, the portcullis will close again.
Yes you have to be fast but thankfully, this game relies on physics. I would imagine if you leaned something up against the portcullis, it may help you out if you end up not being fast enough.
Have to disagree, been able to run without issue with no problem, just takes practice. Also, lean stuff against the gates, does wonders and you don't have to rush or try and balance anything to catch a lever.