In terms of technological innovations, magnetic stripe cards have existed for a long time, since 1960 at least. According to Wikipedia, IBM was the first company to place them on the now ubiquitous plastic cards that we all carry around in our wallets. The information on the card is encoded in three horizontal lines, running lengthwise, called tracks. Mostly only tracks 1 and 2 are used. Indeed, this is where Burger King (and all other merchants) store the data that represents a unique gift card code.
Due to magstripe technology now being so wide-spread, card reader/writer devices have drastically fallen in price. From what I understand, a decade ago writers cost $400. Today they can be found on eBay for about $70, which is where I bought mine.
This article discusses how to source cheaper electronic gift codes, decipher the Burger King magstripe, and write that code to a gift card for easier use.