So Wi-Fi runs in the 2.4 GHz band, yeah (and the new ones 5 GHz)? Which means that every second, a Wi-Fi antenna outputs 2.4 billion square wave pulses, right?

So I was wondering, why can't it transmit data on every pulse, and be able to send data at 2.4 Gbit/s? Even if 50% of that was data encoding, then it would still be 1.2 Gbit/s.

Or have I got the concept of how Wi-Fi works wrong...?

You are confusing band with bandwidth.


Band - The frequency of the carrier.
Bandwidth - the width of the signal, usually around the carrier.


So a typical 802.11b signal may operate at a 2.4GHz carrier - the band - it will only occupy 22MHz of the spectrum - the bandwidth.

It's the bandwidth that determines the link throughput, not the band.  The band is best thought of as a traffic lane.  Several people might be transferring data at the same time, but in different lanes.

Some lanes are bigger, and can carry more data.  Some are smaller.  Voice communications is usually about 12kHz or less.  Newer wifi standards allow bandwidth of up to 160MHz wide.

Keep in mind that while bandwidth and bits sent are intrinsically linked, there is a conversion there too, that's related to efficiency.  The most efficient protocols can transmit over ten bits per Hz of bandwidth.  Wifi a/g have an efficiency of 2.7 bits per second per hertz, so you can transmit up to 54Mbps over its 20MHz bandwidth.  Newer wifi standards go up past 5 bps per Hz.  

This means that if you want 2Gbits per second, you don't actually need a 2GHz bandwidth, you just need a high spectral efficiency, and today that's often given using MIMO technology on top of a very efficient modulation.  For instance you can now buy an 802.11ac wifi router that supplies up to 3.2Gbps total throughput (Netgear Nighthawk X6 AC3200).
