At the end of X-Men: The Last Stand, we see the comatosed, brain dead twin of Charles Xavier talking in Patrick Stewarts voice, implying that he somehow transferred his consciousness into his twins body, which is one theory. for how Charles Xavier is alive in the dark timeline of Days of Future Past.
However, I have a (currently unprovable, thanks to lack of further films to fill in the gaps) theory about the relationship between Days of Future Past and the original X-Men films, including the two Wolverine spin offs.
There is no implicit link between the dark future timeline in Days of Future Past and the original trilogy and Wolverine spin offs other than the characters and the actors who portray them. People are assuming that the events of the dark future timeline shown in Days of Future Past are part of the same universe as the original trilogy and the Wolverine spin offs, despite a massive amount of evidence in the form of plot inconsistencies and continuity issues that this is not true.
I would go so far as to state that First Class and Days Of Future Past are a part of one X Men Universe, and that the original trilogy and the Wolverine spin offs are part of a seperate, now redundant universe. This would explain why Mystique and Professor X never acknowedged one another in the original trilogy, or that Bolivar Trask is a large, alive black man in X-Men: The Last Stand but a small, dead white man in the dark timeline of Days of Future Past, which people are assuming is the sequel to X-Men: The Last Stand. It explains away how Magneto would have ever escaped from prison after seemingly assassinating JFK to go on to be the bad guy of the original trilogy without Wolverine having gone into the past to set him free in the first place, as in the original trilogy we can just assume that was never implicated in the assassination of JFK.
Personally, I find it easier to think of the orignal trilogy and the Wolverine spin offs as another, entirely seperate universe that has no canonical impact on the new universe that was created with First Class and continued with Days of Future Past.