Skating to James Bond theme music, the defending champions put in a strong performance, despite a fall by Castelli during a difficult quadruple flip.
The United States Olympic Figure Skating Team is selected only a few weeks before the Olympic Winter Games begin, which means that skaters and their families cannot plan to attend in advance.
That means despite winning gold, Shnapir and Castelli will have to wait to see if they will travel to Sochi for the Winter Olympics.
The duo performed to the music of Carlos Santana ("Black Magic Woman" and "Smooth") while representing the Skating Club of Boston.
After skating last of the 12 pairs to compete on Thursday, they finished first with 73.13 points.Shnapir's family emigrated to the United States when he was 16 months old.
He graduated from Lincoln-Sudbury Regional High School in 2005.