The magical barrier that surrounds Ferryport Landing was put into place in the early days of the town by members of the Grimm family and the witch Baba Yaga in response to threats of the Everafters conquering neighboring human settlements.
No Everafter is able to leave the barrier (under normal circumstances), which saved the human towns, but since the barrier remains up on the condition of at least one member of the Grimm family remaining in Ferryport Landing at all times, and the family refuses to leave, there is a lot of ill will toward the family for the imprisonment of the Everafters.
When Jake was younger, he found a spell to temporarily lower the barrier for Goldilocks, his brother's then-current-girlfriend. This, however, resulted in his father's death since the Jabberwocky and Red Riding Hood were freed from its prison when the barrier was lowered.
Puck is seriously injured by the Jabberwocky and needs to go to Faerie in order to be healed. Since Faerie is not within the barrier, the Grimms find the pieces of the Vorpal Blade which can cut a hole in the barrier (and kill the Jabberwocky) to save him.
The claim is made that the magic matches that were possessed by Prince Charming could open a portal that would take an Everafter outside the barrier. They get used up (by the Grimms ) though, so there is no way to test whether or not this would have actually worked.
Book 2 reveals that the barrier cuts off somewhere over the Hudson River. Puck forgets this and ends up crashing into it mid-flight. Bannerman Island is outside of the barrier, which makes it crucial in Rumplestiltskin's and Hamelin's plan to dig their way out of Ferryport Landing.
Book 7 reveals that part of the barrier cuts across the train route in between the Ferryport Landing and Cold Spring stations.
The barrier also contains the Ferryport Landing Asylum, which is located on Mount Taurus, meaning that it probably cuts across the mountain somewhere further up the slope. It also manages to contain Hatchettland farther to the north and Old Macdonald's Farm and the Grimm house to the south.