We never completely solved this problem for my D who just turned 19 through the normal school route, especially in lower and middle school. Statistically they just aren't going to find kids like themselves in their classroom, or even maybe in their school. Some things that helped over the years:
- Encouraging her to try activities that might draw other gifted kids. Chess club, science or math club, book club at the library.
- Once she got old enough for there to be more school activities, she got involved in Quiz Bowl, Debate, and Robotics - all "smart kid" activities. There are some Robotics activities (Lego league?) for younger kids, so you might look into that.
- In high school she started to meet some more kids in the honors/AP classes, and by the end of high school had a nice core group of mostly gifted friends.
- I made her do a sport (just something for exercise, I didn't care what) through high school. She picked fencing, and that is also a magnet for smart kids -- she made a couple of friends there.
- Take tests through the local talent searches (TIPS, CTY, MATS); you will get mailings and information on activities that might be a fit. That is where we heard about Davidson THINK, which was a godsend for my daughter when she attended. THOSE were her people. She also got invited to participate in an online gifted kid forum where she found friends like herself in the virtual world (great thing in middle school).
- I participated in a lot of activities with her. We collected insects and monitored a bluebird trail together for years. We took vacations where we visited particle accelerators, science museums and about every other kind of museum you could imagine, went tidepooling, visited aquariums, raptor centers, etc. I just figured if she couldn't find friends her own age, I was interested in a lot of the things she was -- so we would make it work until we could expand her pool of contacts and her universe enough so she could find more people on her own.
- Eventually she went to college, and she picked the most academically challenging colleges she could find. And is now a very happy freshman now with a lot of friends who are much like her.

So it wasn't quick or easy, and we tried a lot of stuff over the years.