Backup to External in Recovery Mode (Terminal or Time Machine)
Whatever you do, leave the faulty disk alone until you know what you are going to do. The risk that the disk breaks entirely any moment now is very high. 

This answer assumes you don't have FileVault enabled.


Get an external backup disk that has enough capacity and connect it.
Press cmd+alt+R before the boot screen appears to enter internet recovery mode. This loads the recovery mode from the internet, which will be very slow. The advantage is that there is no stress on the faulty disk.


Method A – If you want to save individual files:


Go to the menu bar and select Terminal.
Copy the files you want to rescue using cp. For instance, if you have a folder rescueme on your desktop, you can use the following command: 

cp -r /Volumes/mydisk/Users/myusername/Desktop/rescueme /Volumes/mybackupdisk/
This will copy all files and subfolders of rescueme onto your backup drive called mybackupdisk.


Method B – If you want to make a full backup:


Enter the Disk Utility tool
Select the Disk that you want to back up
In the menu bar select File &gt; New Image &gt; Image from “mydisk”
Select your options. E.g. you may want to compress the image to save some space on the backup disk.
Press Save and wait.


It is likely that some parts of your disk are not readable anymore. Therefore the method B may not work and you should first try to save the most important files manually (i.e. method A).

Method C - if you have another Mac:


Connect the two computers, e.g. with a Thunderbolt cable.
On your broken iMac, press T at the boot screen to enter target disk mode.
Now you can use the Finder to browse the broken disk and copy files.