The "Anthem of the United Federation of Planets" was played at a baseball game between the Niners and the Logicians on Deep Space 9 in 2375. (DS9: "Take Me Out to the Holosuite")
According to Ronald D. Moore, the anthem was composed by David Bell. (AOL chat
The musical piece played during this episode was entirely instrumental. It is not known if there are accompanying lyrics.