There's Dark City, for one. In the Mouth of Madness did it with horror novels. There's The Truman Show, which is a similar idea with television.
You could even argue that the TV series The Prisoner is a lot like The Matrix in the idea of a 'real world' and then a simulated world that looks like the real one that the protagonist is trapped in.
Ah, Dark City. Came out not long before The Matrix and was largely overshadowed/ignored. I hold that it's a better film overall. For it's innovation and Keanu's 2nd big break brought out by The Matrix, it's a weaker story. Plus, Dark City has Riff Raff and Jennifer Connelly. No contest.
Edit: Forgot that the Matrix actually reused some of Dark City's sets for the rooftop scenes.
I remember watching a thing where they auctioned off a lot of Star Trek props, and the little flute prop from this episode went for a ton of money. Apparently reacting to this, Patrick Stewart laughed and said "It doesn't play! It's not a real flute!"