Add Gender field in registration form
Magento 2 gives a selection in admin for show Gender field in Registration Form
Please follow the below steps for display Gender field in front. 

1. Login in Magento 2 panel 
2. Go to Stores => Configuration => Customers 
3. Under customer => Select Customer Configuration option 
4. Expand Name and address options tab 
5. Here you can see that field "Show Gender" 
6. If you select "Required" option then it will display in registration form with mandatory field. If you select "Optional" option then it will display in registration form with non-mandatory field. So As per your requirement, please select either required or optional option. 
7. Save the configuration. 

That's it. Now 
You can see this Gender field in registration form.