If the music was originally synced from your computers iTunes library, then you can plug the iPhone in & select it from the Sidebar or Media bar of iTunes. Click on the Music tab at the top next to "Summary.. Info.. Photos..." Unselect the box that says "Sync Music," and apply the changes. It will promt you to remove all the music files from your device, click yes, remove songs. Once this completes, recheck "Sync Music" & Apply. The iPhones music library file directory will now be rebuilt with no missing file links.
If they were originally purchased through iTunes on the device, swipe left to right on each song file and delete the ones not working (being skipped when attempting to play). Then head to the iTunes app, Purchases > Music > All Music > Download All songs not on this device.
If neither of the above fix it, go to Settings > General > Reset > Erase All Content & Settings. But prior make sure your information is either backed up to your computer, or iCloud (Contacts, Calendars, Notes, Shared PhotoStream only). Restoring from a Backup of iTunes or iCloud can return this issue, make sure to set up as new.