If your user is present in database then user might not have connect privilege.
SELECT * FROM V$DATABASE; --This will help you to findout database name. SELECT * FROM DBA_USERS WHERE USERNAME = 'HR'; --HR is user present on database.
You can also try to login with command prompt.
GRANT CONNECT , RESOURCE TO HR; --HR is user. To execute this command, login as sys