IRC is an old-school multi-system, multi-channel, multi-network chat infrastructure. It dates from the 1980s, and was inspired in part by the BITNET RELAY systems that effectively sent messages from mainframe to message over virtual punch cards. RFC 1459 described the protocol in 1993.
Slack is a shiny new system also providing multi-channel, multi-network chat. It’s very much a product of the 2010s, emerging in 2013 after being used for an internal communications channel at a games company. It’s currently valued at a bazillion dollars in the frothy VC environment of 2015.
IRC is open, reasonably well documented, and available to all through a plethora of servers, clients, and web gateways. If you want to set up an IRC network no one will get in your way, except perhaps your own ability to determine which version of which server will work best with which version of which other server. Once you build an IRC network out you have no one standing in your way of doing whatever you want to do except your own technical capabilities.
Slack, by contrast, is completely and thoroughly a 2010s private company. There are private Slack networks that cost real money ($x/user/mo), and public Slack networks which are free but only free because Slack-the-company has decided that they want to provide some free usage tier to help kickstart their growth.
The biggest different between the two systems is ease of use. You can get up and running with Slack by just providing a credit card, and all of the details are taken care of for you complete with tech and developer support. For IRC you are totally on your own, and the DIY denizens of that network are mostly friendly but not always.
The most old-school of old-school Unix people I know still use private IRC running on a local server, accessable only via SSH with all members of the network personally vetted by the cadre of sysadmins who run it. I like it that I have access to that brain trust, but the more typical use of Slack for me this year is the relatively large mostly public networks that have been set up to support an event or keep a community together.
Much has been made of how incorrect it is for open source projects to use a closed-source system for discussion. A few projects using Slack have discovered that they are too big for the free services that Slack is willing to provide, and they are looking for new homes.
Unlike most of the late-1980s public systems (eg. Usenet or Gopher) IRC is still alive and mostly vigorous. But IRC will never be pretty or cuddly or ironic in the way that a venture-funded Slack seems to be.