This issue seems rare, and I'm posting it because someone from the general forums posted a similar issue (http://www.gamesas.com/topic/1596374-urgent-help-needed/). The bug is basically that a whole faction turns hostile towards the player. In the post linked above, the OP has Diamond City security turn against him. I can't say if he did anything to trigger this or not. I think it may be a bug because a similar thing happened to me with the Brotherhood.
This is what I posted in response in the thread linked above:
I had something very similar happen to me, except it happened with the Brotherhood on the Prydwen. I didn't do anything to get on the BoS bad side, and this is right when the Prydwen first shows. I hopped on the vertibird with Danse and set the controller down. When I arrived at the Prydwen, everyone (including Danse), was hostile and firing at me. I don't know what caused this. I reloaded my game to before hopping on the vertibird, and replayed boarding the Prydwen, and everything was fine after the reload. No one was hostile. Seems like there may be a bug somewhere here. On the topic of bugs, I ran into a bug yesterday where there was an invisible wall blocking my path to the Railroad HQ. It was at the secret door that you open via the rotating lock mechanism in the church.