YouTube itself has agreements with most music you can find, in most countries, to allow anyone to upload videos using that music, with no legal problems for the uploader. Thus, it isn't against the law, YouTube has covered it for us.
These music companies can then play ads before your video and take the revenue from it, in exchange for them allowing YouTube to permit you to upload the video with music that is theirs and not yours.
The best thing to do, especially if you intend to spend a lot of effort syncing the video and the music for a nice effect, is to upload the music with a dummy video first, and see if it gets blocked, or if you can just acknowledge that its someone else's music and be permitted to keep the video public. If that checks out, go ahead and make your video with that music. If it gets blocked, then choose another song and delete the dummy video.
And don't challenge YouTube's decision just to get the video to play for a day. Unless you really are using fair use or there really was a mis-identification of music rights, you'll just get your account dinged. Better to simply acknowledge that its not your music and let YouTube take care of the rest.