At one point, when DD was about 8 and being homeschooled, I was desperate enough to start a meetup play group for gifted kids. I reached out to a local talented and gifted group, posted to local relevant mailing lists, arranged to reserve a room at the library next to a part, and brought games and snacks. We met every couple of weeks and the kids would play while us parents kvetched and shared our unique woes.
I couldn't keep it going all by myself for very long (we had a major accident in our household and it was just too much) but in the mean time, DD connected with another very bright girl and they've been friends ever since.
Don't give up. Sure it'd be great if every kid made lots of friends at school, but school isn't the only place in the world.