In my opinion the reasons for loss of userbase & mindshare:
1 Spam and noise -> No proper authentication and moderating system for channels. It's hard to keep bad agents out of channels.
2 Competition -> Forums had more features (including a solution for point 1, also https) and didn't require a special client. If you could easily send cat gifs in chats IRC would have been great.