I have faced this issue before. Your site would have a lot of spammy links outgoing to other domains which may be either casino links or other links which are termed spam by Google. You need to track the file from your FTP where this malicious code has been placed and remove them. Once removed, you can use any site security scanner paid service which will secure your website.
Alternatively, if you want to try something of your own free, install Wordfence plugin of wordpress if its in wordpress and run scans. You should be able to track the code.
Thanks