Same problem with iPhone 6 64GB. It looked like I was going to have to restore the iphone, but accidentally got it working in about 3 minutes with this sequence:
1. Connected to iTunes on PC
2. Attempted to sync with iTunes. iTunes thought the 30GB of music on the iPhone was "Other files", and refused to sync as adding to 30GB of music again would take the storage on the phone over the 64GB limit.
3. Disconnected the iPhone, then changed my mind and re-connected it.
4. Hit "Back Up Now" on iTunes in preparation to do a restore. This worked some weird magic. After the backup, iTunes recognized the music on the iPhone as being music again.
5. Ran a sync again just to make sure. This took about a minute as there was nothing new to sync.
The iPhone now finds all my music and playlists again.
Talk about flaky. If I was going to have to restore the phone and sync the music library yet again (long story), I was going to give up on iTunes and use Plex or Google Play Music instead. As it is, I've *just* stayed with iTunes/Music app.
Suggest that other people try something like the above steps, but make sure you have a *spare* backup of the iOS device somewhere first: either on iCloud or by copying a backup subfolder from the iTunes backup folder (see Find and manage your iTunes backups - Apple Support). If that doesn't work: How to erase your iOS device and then set it up as a new device or restore it from backups - Apple Support