I was confused by definitions 2 and 3 in this dictionary:
( learnersdictionary.com/search/access[2] )
and it gives examples for each definition:
2 "They tried to gain illegal access to the company's network"
3 "Investigators are trying to gain/get access to his financial records."
I still don't see the problem. Anyhow, they wanted to use the company's network for illegal reasons, and they couldn't. This might be because they couldn't get past the guard, the computer room door was locked, the computer was locked, they couldn't guess the password ...
Same for 3.
Definition 3 about getting permission is an unlikely meaning if they are trying to gain illegal access.