One practical reason that causes your raspberry pi can't connect to your WI-FI automatically. (The reason why your raspberry pi can't run when you using GPIO power supply)

You should use your Voltmeter to check if your power supply less than 5V, if so, raspberry pi can not run.

___

Of cause, if you use a USB cable to power your raspberry pi, nothing will be wrong.