Any possibility at all to (ethernet) wire it? If you can't get a wire to it and are using a mesh wifi unit, position a node near it and connect via ethernet to the node. Or consider a Powerline ethernet option which uses your home wiring to sometimes work as a reliable way to get ethernet to where you want it.
Else, there are many possibilities. Wifi has finite bandwidth. If it works sometimes and doesn't work others, do the latter times coincide with when perhaps others in the household are also taking up to big bites out of the bandwidth? There's only so much to go around, no matter how fast your broadband connection.
Have you reset your password lately to perhaps kick some wifi freeloaders (neighbors) off? Someone you shared your wifi password with once may be (even unknowingly) hogging a bunch of your bandwidth now if they live close enough.
Have you restarted modem, restarted router, restarted AppleTV just to shake out any accumulated kludge from not restarting those for a good period of time?
Have you ruled out the AppleTV itself by temporarily running an ethernet cable across the floor to test to see if it still loses connection? If so, I start suspecting your AppleTV has a probable fault. This test is not about leaving the ethernet cable long term- just ruling out something being wrong with wifi on your AppleTV (itself).
Do you notice this at a specific time(s) each day but other times it is fine? If the problem time is a busier time and neighbors live close enough to perhaps act as some wifi interference, you might try changing wifi channels.
Is there classic wifi disrupters in use when you lose connection? Microwave? Etc.
Have you checked wifi signal strength where you have your AppleTV? For example, use wifi on a phone or iPad and push them into the area when you have the AppleTV. Full wifi bars or not many bars? If wifi is weak there, try looking for another spot for your AppleTV with a stronger wifi connection. Sometimes even a few feet (move) can make a difference. Try both X and Y axis, meaning higher or lower positioning can make a difference too.
The key to success here is experimentation to try to narrow in on the cause.