I have encountered this issue before when I updated to iOS 11 during the betas.
Might wanna sign out from iCloud and then signing in back?
Otherwise, you might wanna delete some of the recently taken photos that aren’t synced as they may be deemed as ‘corrupted’. You may of course export those images out first.
If that still doesn’t work, I did turn off iCloud Photo Library, sign out from iCloud, and delete all the images from the photo library.
(You may wanna backup the photos just in case if it really do get deleted, forever)
Then sign in to iCloud, enable for iCloud Photo Library and might take a while before the sync feature do get started up.
If all fails, backup your device and restore it.