Merging the frequency rankings of boys' names and girls' names
There is a number of things we can do to improve the solution performance-wise, but, most importantly, you don't need two dictionaries for boy and girl names and can have a single dictionary checking for the minimum value on the fly.

What if we use a collections.defaultdict with a default int value being a big number, such as sys.maxint, then we iterate over every row with ranks, boy and girl names and leave minimum ranks only.

We can also use re.finditer() instead of re.findall() to avoid having an extra list created in memory - you may notice the difference on bigger input files:

from collections import defaultdict
from time import time
import re

import sys


def extract_names(filename):
    names = defaultdict(lambda: sys.maxint)

    with open(filename, "r") as f:
        html_data = f.read()

    filematch_year = re.search(r"Popularity\s([\w.-]+)\s([\d.-]+)", html_data)
    year = filematch_year.group(2)

    filematch_rank_names = re.finditer(r'td&gt;([\d.-]+)&lt;/td&gt;&lt;td&gt;([\w.-]+)&lt;/td&gt;&lt;td&gt;([\w.-]+)', html_data)
    for match in filematch_rank_names:
        rank, boy_name, girl_name = match.groups()
        rank = int(rank)

        names[boy_name] = min(names[boy_name], rank)
        names[girl_name] = min(names[girl_name], rank)

    with open("output.txt", 'w') as output_file:
        output_file.write(year + "\n")

        for name, rank in sorted(names.items()):
            output_file.write("{name} {rank}\n".format(name=name, rank=rank))


Note that the results are sorted by the names as required by your Google challenge:

1998
Aaliyah 222
Aaron 37
Abbey 408
Abbie 603
Abbigail 612
Abby 194
Abdul 970
Abdullah 897
Abel 378
...


Here is the simple timeit benchmark for both yours (extract_names) and mine (extract_names_new) solutions showing a dramatic improvement on my machine:

In [1]: %timeit extract_names("baby1998.html")
10 loops, best of 3: 103 ms per loop

In [2]: %timeit extract_names_new("baby1998.html")
100 loops, best of 3: 5.66 ms per loop