Google Play wouldn't work to update any apps and Gmail was in a continuous loop asking to setup an account but crashing when you tried to do so.
|Nexus 4 Android 5.0 Lollipop SMS Message Send/Receive Failure
The cause seemed to be Google Play not installing correctly as part of the Android Lollipop upgrade. Every time it was installing it was complaining about running out of space yet there was sufficient available. Eventually the installation failed and Google Play was left in an unusable state along with most of the features of the phone.
The solution was to install a replacement version of Google Play store from an APK file. I copied this to my Onedrive but the same could be done with Dropbox or Google Drive and ran the file from there.
The installation took many hours, possibly as many as 12 hours and eventually the phone ran out of charge. Once it was restarted the Google Play store was now working and that seemed to fix the problems with SMS text messages and emails as well as being able to add new apps correctly.
Fortunately the SMS messages I'd missed over the last few days still got delivered so I was able to respond to them.