It sounds to me like you are letting your child get away with his behavior, possibly because of his gift. Any child will get into trouble and will test their limits. You need to set boundaries and stick to them just like is needed for every child. The biggest difference - for me at least - is that along with the time-out I need to explain why the behavior was wrong and allow him to ask questions. It is not simply "go to time-out" but often a 5+ minute conversation regarding the issue.
You need to offer explanations of why the behavior was bad. Part of the problem with advanced children getting into trouble this young is that they have all of the "normal" curiosity for their age, PLUS the intellectual curiosity of older children. This can be complicated by the simple fact that a child this age does not have enough safety skills to investigate some of those things yet.
My advise is to set firm boundaries and then stick to them. Offer clear explanations. Most importantly, when you see him wanting to get "into" something he should not, you need to find a fun & age appropriate way to allow him to explore his topic of interest. Good Luck!