Does he know that he will be able to come back again?? Maybe he thinks he will never get to have that kind of fun again if he leaves.
BTW, three is WAY worse than two (I don't know why this is one of those big secrets of parenthood - three is so much more difficult). Anyhoo, He is old enough to get the cause/effect thing. He really does understand alot, including how to push your buttons.
Good idea with the timer. I use my cell phone alarm daily to get my kids out of the playground, etc. I leave the alarm ringing until one of my kids turns it off for me, and I know then that they are resigned to getting in the car. Let him know clearly that he will get this type of playtime again tomorrow (or whenever), but if he carries on, he will not get to play. Tell him the rules before you start playing and remind him about it five minutes before the buzzer will beep (especially the coming back tomorrow part!!). He may just need time to complete a mud pie or recreate a scene from his favorite Barney episode, so make sure he has a few extra minutes. He may decide to have his tantrum later, which is fine. Just put him in a safe place and let him tantrum. When he has calmed down again, let him know your expectations and be really, really consistent.
With my second daughter, I tried the old "bye, I'm leaving now" and actually left and hid so she couldn't see me and she didn't care. Now I say "It is time to go - do you want me to carry you or will you walk by yourself?" and let her choose which method. She is still two, but just that little bit of giving her some power to choose makes her feel better.
A three year old can be one of the most trying people to deal with (Maybe until teenage years!?!). Good luck