There are several reasons for this. The most common reason is that the account you are using while logged into mssql through ssms does not have access to the drive definition you are using as your source. Network drives are a good example of an access conflict.
Assuming you have access to the drive, try redirecting the network drive to a local drive letter via
xp_cmdshell (
Note: be sure use of xp_cmdshell is enabled) .
exec master..xp_cmdshell 'net use Z: "\\BackupServerXX\<share>\PathWithoutTrailingSlash" YourADpasswordHere /user:domain\your.Username'
Declare @restorefile varchar(1024) = 'Z:\thebackupfile.bak'
Restore database x
From disk = @restoreFile
When you are done, or if you've made a mistake and need to reassign the drive, delete the reference.
exec master..xp_cmdshell 'net use Z: /delete'