Managed to get it working like this:
In /template/catalog/layer/view.phtml i added these variables in the top:
if (Mage::registry('current_category')) {
$_category = Mage::registry('current_category')->getId();
$parentId = Mage::getModel('catalog/category')->load($_category)->getParentId();
}
Then I changed the code that's getting the available filters. The name of my filter is 'Filter' and the only category I want it shown on has id 317.
<dl id="narrow-by-list">
<?php if ($_category == 317 || $parentId == 317):?>
<?php $_filters = $this->getFilters() ?>
<?php foreach ($_filters as $_filter): ?>
<?php if($_filter->getItemsCount()): ?>
<dt><?php echo $this->__($_filter->getName()) ?></dt>
<dd><?php echo $_filter->getHtml() ?></dd>
<?php endif; ?>
<?php endforeach; ?>
<?php else: ?>
<?php $_filters = $this->getFilters() ?>
<?php foreach ($_filters as $_filter): ?>
<?php if ($this->__($_filter->getName() == "Filter")):?>
<?php continue; ?>
<?php endif; ?>
<?php if($_filter->getItemsCount()): ?>
<dt><?php echo $this->__($_filter->getName()) ?></dt>
<dd><?php echo $_filter->getHtml() ?></dd>
<?php endif; ?>
<?php endforeach; ?>
<?php endif;?>
</dl>