Hello all... I admit that I haven't gone through and read every post here but after reading the first few pages looking for an answer, I stumbled upon a solution that worked for me... forgive me if this has been already stated, but for the sake of others googling for an answer, here is what worked for me:
I had greyed out songs in the iphone music app that could not be deleted and I had tried several combinations of syncing, checking and unchecking sync options in itunes, re-adding and removing the same tracks and nothing allowed me to delete these songs. I do not have iTunes match enabled and am not backing up wirelessly to iCloud ... I couldn't figure out what was going on because on top of that, these greyed out songs disappeared when I was in airplane mode. Here's what I did:
First... this will remove all music from the music app so if there are any songs or voice memos that you don't already have in your itunes on your computer, transfer them first... (it will leave your podcasts intact providing you have the podcasts app installed)
Using 3rd party software, I viewed the raw file system of the iPhone (how you do this is up to you... I used iFunbox), navigating to: var/mobile/media/iTunes_Control/iTunes ... I selected the file 'MediaLibrary.sqlitedb', made a backup copy on my desktop and then deleted it from the iphone. I restarted the iphone and the problem tracks were gone. In fact, the music app was finally completely empty... then a moment later, the U2 album showed up (which was fine since I hadn't bothered to officially remove it before) and then I was able to start filling it with songs in the usual manner, which for me was adding them manually. SUCCESS!
I can't say with any certainty but I believe that the MediaLibrary.sqlitedb file is the iOS equivalent of the iTunesLibrary.xml file in OSX... the file that has all the information about your library except the actual songs files themselves... so what I figure is this medialibrary file had gotten corrupted from interrupted sync sessions or something and deleting it forced iOS to rebuild one from scratch and now everything seems to be cool.
I hope this helps...
Yahenda
(iPhone 4 iOS 7.1.2)