Add this to product-grid-item-liquid:
(Remove the third line if you don’t want the quantity field to show)
<form method="post" action="/cart/add">
<input type="hidden" name="id" value="{{ product.variants.first.id }}" />
<input min="1" type="number" id="quantity" name="quantity" value="1"/>
<input type="submit" value="Add to cart" class="btn" />
</form>
Add this to theme.scss.liquid to center it:
.add-to-cart{
text-align: center;
}