Try the following steps, check whether things are working after each step where appropriate, before trying the next.
- Check AirPlay is turned on on the Apple TV (turn it off and on if it already is)
- Check that both devices are on the same network (System Preferences > Network, on the Mac and Settings > General > Network, on the Apple TV).
- Restart the Apple TV (Settings > General > Restart).
- Restart the Apple TV by removing ALL the cables for 30 seconds.
- Restart your router. (Also try removing it’s power cord for at least 30 seconds)
- Restart your computer.
If you are still having problems, try turning off bluetooth if it's enabled, also try using 802.11n for wifi if you are currently using either 802.11b or 802.11g.
Additionally, the following article(s) may help you.
Wifi Diagnostic Software (for Mac users)
You may also find some help on this page, where I’ve collected some of the more unusual solutions to network issues.
When making adjustments to your network for better optimisation, you may find some of the points mentioned on this page helpful.