You're talking about authentication, and you'll need a way to store and compare credentials on a server to do that.
In its simplest form, the process looks something like this:
1. Create a user record with an email and a unique access code. This can be as simple as creating a list of key-value pairs in a flat file on your server.
2. Provide user with access code and link to the website
3. User visits link and authenticates with email and access code.
4. Server looks for a matching email/access code pair
5. Server sets a cookie with the access token and redirects to the protected content
6. Before serving a protected page, the server checks the access code stored in the cookie and makes sure it matches the one on the server
7. If it matches, serve the page. Otherwise, redirect to a login form with your message.
You can actually perform all of this with apache http basic authentication and mod_rewrite, no server language necessary.
If you need something more complex, then just pick a general purpose language that you can run on a server and learn how to build web pages with it.
There's really no way around that if you want to do it yourself.
Common languages used for the web are PHP, Java, Python, Ruby, C#, Javascript, and Perl. Some of these are more fashionable than others. Just pick the one you like best.