It's a doddle with E-TTL auto flash. Put the camera on Av, and it will match the overall exposure to the ambient light, eg sunset, and then the flash will match it's output to balance the foregound exposure with the f/number selected. Bang. Job done.
The main danger is that if the subject is off centre, as I guess it might be, then the flash might try to balance with the background which will obviously blast the foreground subject to bits. So use the flash exposure lock button (FEL marked * ). Basically, point the camera directly at the foreground subject, press the * button which will fire the pre-flash and calculate the correct flash exposure and it will lock it. Then re-frame the composition as you want and away you go - the main flash will fire at the correct power. The handbook explains this.
If either the foreground or background is too light or dark, then adjust the brightness of the background by adjusting the +/- exposure compensation on the camera. To alter the brightness of the foregound subject, adjust the +/- compensation on the gun. These two controls work independently.
If you're on auto white balance, this will automatically switch to flash. If you want a slightly warmer result straight out of the camera, whack the white balance up to 10,000K. This will also make the sunest a bit more orange too, but there's usually so much red in there anyway you'll hardly notice it. Might even prefer it.