1st clean with a good alcohol spray.
fill as much of the gap as possible with mastic, but do it a bit at a time, leave it an hour between and stick a fan in the shower to help it go off. when the gaps all sealed buy some trim like this
http://www.wickes.co.uk/plain-bath-trim/invt/166086/
stick it down with mastic and wipe away any leftovers and let it cure, after its cured you can mastic the edge for a neat finish, if your crap at a neat finish use insulation tape and mask off the trim and tiles so you have a 3mm gap to mastic, put a thin bead in and use a finger dipped in clean water with a drop of washing up liquid to smooth it off, straight away remove the tape and repeat with the soapy water to remove the lip.
i have never found a sealant finishing tool to beat a wet finger yet!
perfect result and a tripple water proof barrier.