What you need here is something to bridge between TCP/IP and GPIO.
For the cheapest solution, you can use an ESP8266 module and program it to connect to your Wi-Fi network and perform this conversion.
Stepping up a bit, there are Linux-based solutions like modules with AR9331, MT7688 or the Raspberry Pi Zero W.
For the TCP/IP side ESP8266 may need to use a stripped down protocol and develop using microcontroller-specific tools. If you need IPv6 more work will be involved. For Linux-based solution standard Web development tools will work, and it is much easier to implement dual stack support.
For the brave ones with Ethernet cables, try STM32F107 + DP83848 + PoE