This could be many things, because children may respond very differently.

It could be that a higher academic challenge is needed to help him feel at ease in the school setting as he is at home.

You mentioned social skills. You may have read this elsewhere on the forums: resources such as Gifted Kid's Survival Guide, The Unwritten Rules of Friendship, You are a Social Detective, and social thinking (perspective taking) may be helpful.

You mentioned perfectionism/anxiety. Perfectionistic tendencies may be a sign of developing a fixed mindset rather than a growth mindset. One aspect or application is that gifted kids may stop taking appropriate risks in order to always be "right" or always be "smart" or never be "wrong", and this may work against them. The concept is nicely summarized in these youtube videos:
Ashley Merryman & Po Bronson: The Myth of Praise (link-
)
Teaching a Growth Mindset (link-
)

Parents may wish to read the book Mindset by Carol Dweck for tips on promoting a growth mindset.

A book which seems to understand perfectionism very well and which many find supportive is What To Do When Good Enough Isn't Good Enough. Another book you might like is Perfectionism: What's Bad About Being Too Good. While insightful, these are written gently for kids, in a style that is fun and engaging. With any of these books it may be wise for a parent to pre-read and decide if it seems to be a helpful tool to use in guiding their child.

A child considering "worst case scenario" and finding various work-arounds to keep moving forward may in some cases help reduce anxiety and add an element of self-confidence, even a sense of looking forward to taking on the challenge.

The article, 10 Steps for Parents and Kids to Tame the Worry Monster Daniel B. Peters, Ph.D. on Huff Post Parents, discusses anxiety. Interested readers can sign up to receive updates from the author.

The book, Make Your Worrier a Warrior, (2013, Great Potential Press) authored by Daniel Peters Ph.D. lends expert insight to understanding what a child may be experiencing. For example, pages 44-45 suggest that parents may wish to think of acting out as
Quote
a variation of the "fight or flight" response... children couldn't articulate their fears... they were reacting behaviorally because their amygdala, or their emotional brain, was overriding their thinking brain... kids often do not have the emotional vocabulary and/or insight to tell you what is going on...
Armed with this knowledge, working on helping a child understand nuances of feelings and vocabulary to express their interpretation of what they are experiencing, may prove helpful.

Wishing you all the best.