Find My iPhone Activation Lock - This is a security feature, in part to deter re-selling of stolen devices.
http://support.apple.com/HT201365
Turn off Find My iPhone Activation Lock (formerly: Activation Lock: Removing a device from a previous owner’s account) - An activation lock can only be removed using the log-in information for the account that applied the lock.
https://support.apple.com/HT201441
Get the owner of the account to remove the lock or return the device for a refund. The device is otherwise useless to you.
If the owner has not provided contact information as a message showing in the login screen, there is no way to contact the owner unless the person who gave you the device knows them.
There is no reliable database to check if an item is stolen and Apple is very unlikely to assist you with an ebay phone.