You can withdraw your acceptance, and although the people involved may be a bit annoyed, they should understand teat you think you've had a better offer, and they've got plenty of time to find somebody else. Talk to your current project supervisor for advice on how best to turn down your place (they may know the people involved, which might be useful).
As part of our role in this forum is to play devils advocate, I should say that staying at the same institution for your PhD may not be the best idea. It's important to get as many influences as possible as a young researcher and that can mean changing labs and institutions. The most important thing to consider is whether you are tempted to stay because of the research project or because it's an easy option to stay in the same city.