Is playing slot machines at an online casino legal in the UK?

Yes. Since the introduction of the Gambling Act of 2005 it is legal for residents of the UK to gamble. Gambling online included.