In Star Trek: Strange New Worlds IV , there is a TOS short story Tears for Eternity , that is set in the 523rd Century (about a new generation of Horta , sequel to The Devil in the Dark ).
However, (a) this perhaps isn't canon, and (b)
I don't believe there's any reference to the Federation at that point.
In Star Trek: Strange New Worlds II , there is a TNG short story I Am Become Death , that is set in the 44th Century (about a future with many Datas, prequel to Brothers ).
However, (a) this probably isn't canon either, and (b)
I haven't read this personally, so I don't know if the Data future has the federation, either.
In Living Witness (Voyager S4), an alternative Doctor is activated and heads off to the Alpha Quadrant in the 31st Century .
I don't recall (but it's been a long time since I saw it)
any mention of whether the Doctor knows that the Federation is/is not around at that time.
The ship from Future
Tense (Enterprise S2) is from the 31st Century , and had human/Vulcan crew.
I don't recall (also a long time since I've seen this)
any mention of whether it is a Federation ship (probably not, since Enterprise don't know about the Federation at this stage).
In Future's End (Voyager S3)
we see the U.S.S. Aeon from the 29th Century .
This presumably is the Federation, and is canon - but the timeline is wiped by the events of that episode.
In Relativity (Voyager S5), a semi-sequel to Future's End , we see the inside of the Federation timeship Relativity, in the 29th century .
This timeline was not erased by the episode's events.
In A Matter of Time (TNG S5)
we see a time pod from the 26th Century (via the 20th).
There's no indication of what the 26th Century is like, however.
In Crossroad (TOS novel) there's discussion of the Federation in the 26th Century : Starfleet and the Federation are corrupt and controlled by a private company.
A traveller from the future is trying to get rid of the Federation in Kirk's time to prevent this.
I'm not sure if this is canon or not, but it's probably the closest to addressing the future of the Federation itself, rather than just the future in general.
(As an aside: the novel is by Barbara Hambly , who has written many excellent non-Trek novels).
scifi.stackexchange.com/users/108/Tony Meyer
In terms of time travel, several storylines contain characters who travelled from ~500 years in the future back to the 'present' of the show, but most of the time travel episodes in which the cast travel through time send them to the past, not the future.
There are also a number of alternate timelines in which we see further into the future, but they don't really count, since they're alternate timelines.
The 2009 Star Trek film contains the furthest forward part of the actual storyline, when Romulus is destroyed in 2387, creating the alternate timeline that the film is set in.
The events of Nemesis take place in 2379, and the events of DS9 and Voyager take place in the 2370s
(Voyager between 2371 and 2378, and DS9 between 2369 and 2375).
See this Memory Alpha article for more details about specific parts of the timeline.
scifi.stackexchange.com/users/122/Nellius
A brief scene in an episode of Enterprise took place in the distant future, aboard the Enterprise J.
I believe that's the further forward seen on the TV show/movies, as the Enterprise J wouldn't have been built until after the Enterprise E, F, G, H, and I had been destroyed.
Nemesis pretty well trashed the Enterprise E, but I don't think they moved on to 'F' yet.
I think the ships have an average lifespan of ~30 years (just a WAG).
Memory Alpha says the ship exists in the 26th century, when humanity is 'beyond transwarp' and 'exploring other galaxies, beyond the milky way'.
scifi.stackexchange.com/users/656/Jeff
Seems to be Nemesis, according to the Star Trek timeline .
scifi.stackexchange.com/users/125/Elzo Valugi
The Star Trek MMO (Massively Multiplayer Online) is supposed to take place in the original Star Trek universe after Romalus was destroyed, but I don't think it is offical consider canon.
scifi.stackexchange.com/users/321/Mike
It is the 31st century, 3040 to be exact: Ship from Enterprise episode
"Future Tense" commissioned.
Source:
Timeline of Star Trek (Wikipedia).
scifi.stackexchange.com/users/761/vonjd
The furthest point in the future which has been depicted in any canonical Star Trek work so far has been in the two-part Enterprise episode, Shockwave .
Here, Archer and Daniels travel to the 31st century.
However, the view here is only of one possible future and the timeline has probably been significantly changed since.
scifi.stackexchange.com/users/1639/Iszi
Star Trek: Enterprise  turned out to be a cool series, with some convoluted time-travel story arcs.  In one, you see the Federation far in the future fighting a battle against the  sphere builders .  I haven't read any of the  Star Trek  novels and I was wondering if any of them go any further into the future of the federation.  Are there any published Star Trek works that address the far future of the  Federation ?
What Star Trek work takes place the furthest into the future of the Federation?
scifi.stackexchange.com
<star-trek><time-travel><star-trek-enterprise><federation><star-trek-eu>
scifi.stackexchange.com/questions/947
scifi.stackexchange.com/users/35/Mark Rogers
The events of Nemesis take place in 2379, and the events of DS9 and Voyager take place in the 2370s. However, the 2009 Star Trek film contains the storyline furthest into the future, as Romulus is destroyed in 2387, creating the alternate timeline that the film is set in. There are a number of claims for the furthest point in the future depicted in Star Trek: Nemesis, Shockwave, the 2009 Star Trek film and a brief scene in Enterprise.
The 2009 Star Trek film goes furthest into the future. A scene in an episode of Enterprise took place in a distant future. Nemesis seems to be the furthest point in the future according to the Star Trek timeline. The furthest point in the future depicted in any  canonical  Star Trek work is Shockwave.