Ghostly Prison reads: 'Creatures can't attack you unless their controller pays {2} for each creature they control that's attacking you.' This is a cost requirement, not a restriction based on summoning sickness or any creature ability. Haste is entirely irrelevant to how Ghostly Prison functions.
Haste (CR 702.10) allows a creature to attack and activate tap abilities even if it hasn't been under its controller's control since the beginning of their turn. It only bypasses the 'summoning sickness' rule (CR 302.6). It does not grant any ability to ignore additional attack costs imposed by permanents like Ghostly Prison.
Ghostly Prison imposes an additional cost during the declare attackers step (CR 509.1b). If a player cannot or chooses not to pay {2} for a creature — haste or not — that creature simply cannot be declared as an attacker against you.
Example: Your opponent plays a Goblin Guide (which has haste) on their first turn and immediately attacks you. Because Goblin Guide has haste it can attack, but your Ghostly Prison still requires your opponent to pay {2} or Goblin Guide cannot be declared as an attacker targeting you.
So Ghostly Prison is just as effective against haste creatures as against any other creature. The tax applies universally to all creatures attacking you, regardless of haste, flying, or any other ability.
Unofficial fan resource — not affiliated with or endorsed by Wizards of the Coast. Answers are AI-generated estimates grounded in the Comprehensive Rules and are not a substitute for an official judge. Verify anything match-critical.